Jump to content

mantas393

Members
  • Posts

    29
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

mantas393's Achievements

Newbie

Newbie (1/14)

1

Reputation

  1. I created a voucher that should exclude products on sale. When I only have discounted products in my cart it works as expected. If I there are not-discounted products in cart, then the Voucher is applied to all cart, including products already on sale. I tried to implement code changes from this thread, but it doesn't seem to work for me: https://www.prestashop.com/forums/topic/290274-disabling-discounts-cart-rules-to-items-already-on-sale/ Maybe in 1.7 there is another way to solve this?
  2. Hello, I created a Cart Rule programmatically and now i want to restrict it to one product only. Is there some method to do it or should i manually set $product_restriction to 1, and then insert values to ps_cart_rule_product_rule_group and ps_cart_rule_product_rule_group tables? How would you do it?
  3. What I tried: I created a discount coupon in back office. Coupon ID is 54 A hook calls a module when Cart page is loaded. In my module i wrote: $cart_rule = new CartRule(54); $cart_rule->add();
  4. @joomleader, probably, I coundn't find anything like it. So I already started developing my own.
  5. I'm developing a module that would suggest a few products in cart with temporary discount. The discount would be applied, only if product is added to cart from this "suggestion section". I'm currently stuck with trying to change product price. Is there any method that i could use to change the products price? Or maybe there are some other way to change price?
  6. I want to have an ability to assign one or few products to product X. And when product X is added to cart there should be a suggestion to buy assigned products with discount. Are there any modules with this or similar functionality?
  7. Hi, One of the core files classes/stock/StockAvailable.php contains: class StockAvailableCore extends ObjectModel { public static function getQuantityAvailableByProduct($id_product = null, $id_product_attribute = null, $id_shop = null) { ... } ... } I want to call this getQuantityAvailableByProduct() method from my module. So I tried to include this class, extend it and call method like this: <?php require_once('../../src/Core/Foundation/Database/EntityInterface.php'); require_once('../../classes/ObjectModel.php'); require_once('../../classes/stock/StockAvailable.php'); $MyClass = new StockAvailableCore(); $MyClass->getStockAvailableIdByProductId($id); And the error that I'm getting: PHP Fatal error: Uncaught Error: Class 'ObjectModel' not found in /home/mantas/Server/honey/classes/stock/StockAvailable.php:34 What am i missing? And Is this the correct way to extend a class and call method?
  8. Thanks artivelab, I'll try to implement this.
  9. @Daresh, so I bought the module and yes, It does exactly, what I asked:) Thanks for the reply:) Also it's pretty easy to use.
  10. I can edit CSS, so it's not a problem. I will not be the one uploading pictures, I want it to work with any given image dimensions. I wrote one module that displays some images on main page and used PHP GD library functions to crop and resize those images, then I though I could use same approach and somehow override the default resizing functionality, but it seems way too much of a hassle, so i'm willing to pay for some solution.
  11. Hi @Daresh, thanks for reply, I want all my product images to be 400x100. No smaller, no bigger, resized as much as possible and the cropped. Would this module let me to do this?
×
×
  • Create New...