Jump to content

wadhwa016

Members
  • Posts

    11
  • Joined

  • Last visited

Profile Information

  • First Name
    Sumit
  • Last Name
    Wadhwa

Recent Profile Visitors

269 profile views

wadhwa016's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. for those who're looking for a way to tie products (let's say, `array( 1 => "12122", 2 => "12123", 3 => "12124");`) with a specific cart rule: Since there is no class based implementation for the same, it has to be done manually by making entries to three database tables. So, after you `$cartrule->add()` you get, `$cartRuleId = $cartrule->id` (new Cart( $cart->id) )->addCartRule( (int) $cartRuleId); // apply the cart rule this existing cart # first, save `id_cart_rule` & `quantity` and get id_product_rule_group Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'cart_rule_product_rule_group` (`id_cart_rule`, `quantity`) VALUES ('.(int)$cartRuleId.', "'.(int)$qty.'")'); $id_product_rule_group = Db::getInstance()->Insert_ID(); # second, save `id_product_rule_group` & `type` and get id_product_rule Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'cart_rule_product_rule` (`id_product_rule_group`, `type`) VALUES ('.(int)$id_product_rule_group.', "'.$type.'")'); $id_product_rule = Db::getInstance()->Insert_ID(); # finally, using id_product_rule assign products foreach ($action['product_ids'] as $id) { $values[] = '('.(int)$id_product_rule.','.(int)$id.')'; } $values = array_unique($values); if (count($values)) { Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'cart_rule_product_rule_value` (`id_product_rule`, `id_item`) VALUES '.implode(',', $values)); } Source: Admin controller for cart rule Hope this helps.
  2. I want to modify Cart Price Rule class in a way such that when a certain condition meets in a cart, the price would update (i.e a cart rule will be applied) - the action I wish to apply isn't in the Cart Rule Admin office. I was thinking of using HOOKS. And in one of the cart hooks I can capture the cart & its products and see if the cart matches my condition, and if it does how would I go about updating the price of the whole cart programmatically?
  3. I understand that there's an existing feature in Prestashop that lets you set priority if a product has different specific prices. However, I consider it to be incomplete. There's a lack of handling Specific Price crashes. Suppose, I set a "Price Rule" for "Home" (2% discount, 18 qty, A group) and I set another "Price Rule" but for a Category "XYZ" (3% discount, 18 qty, A group). So I want all the products to have 2% discount except those who belong to Category "XYZ". But on my store I wouldn't notice that. I would notice that I'm getting 2% discount on every product even if a product belonged to Category "XYZ". What I want is that there should be a way that would allow me from the backend to simply prioritise these specific prices set by Price Rules. Note: Perhaps there are things I might be missing. It would be awesome if you could throw some light on the matter. Also, I know I can set Category "XYZ" rule before all the "Home" rules to get it to work. But, being able to do it from backend, would make a useful feature for Prestashop.
  4. i have it per price. there's a group called X. if a customer belongs to this group s/he shouldn't get free shipment over $50 but $180
  5. In prestashop backoffice, I'm able to set free shipping from above $50 through shipping preference. sadly, I can't change shipping preference as per groups. What I want is: normally there won't be any shipping cost for cart price over $100 but for group X cart price should be above $180 to get a free shipping. Is that possible or do i have to dig into core files to make changes..
  6. is there a way through prestashop backend or development to expire user session from all browsers once the user changes his/her password. What I've got so far is that we have to create new session and store session in db & browser on every login and check on every page request. though it adds to one extra call to check browser stored session against db one on every page request. Does prestashop provides something like this out of the box. Thanks
  7. I'm working on a CMS page to display company's FAQ. I'm using Bootstrap FAQ accordion to be able to do that, which uses classes like 'data-toggle' , 'data-parent', and 'data-target'. After inserting the source on the CMS creation page and saving it, the aforesaid tags (data-toggle, data-target) automatically get removed from the divs I'd applied these classes to. I think it's a bug in Prestashop 1.6.*. I had no other way but to directly enter it in the database table, which I reckon merchant won't like doing. Any way to fix this. Thanks.
  8. I've got Layered Navigation enabled on all category pages. On few category pages it seems to cause an issue with Sort by options. On choosing any of these Sort by options (Price: high to low etc.) ajax loads the gif but nothing happens. But while having layered navigation disable, Sort by options are working just fine. Any ideas where to look for a solution. thanks
  9. I finally came to the conclusion that instead of incorrectly using product slider for displaying promotional banners at homepage I better use carousal and manually provide them links to the product page. Thanks to all for their replies.
  10. Hey guys, I have a store in which there is a product which has multiple images. This product is also a featured product that is being displayed on the homepage. I want to know if it is possible to disable/remove one of the images of the product at product page. This image is being used on homepage as some sort of promotional thing and not a product itself. There are other images that I want to have displayed on the product page but not this one. Thanks
×
×
  • Create New...