Jump to content

Vee.K727

Members
  • Posts

    44
  • Joined

  • Last visited

About Vee.K727

  • Birthday 01/14/1993

Contact Methods

Profile Information

  • Location
    New Delhi
  • First Name
    Vipul
  • Last Name
    Kapoor

Recent Profile Visitors

358 profile views

Vee.K727's Achievements

Newbie

Newbie (1/14)

  • First Post Rare
  • Collaborator Rare
  • Conversation Starter Rare
  • Week One Done Rare
  • One Month Later Rare

Recent Badges

1

Reputation

  1. Close. That's the delivery address though. The actual place where shop address is coming from is classes/pdf/HTMLTemplate.php Line 82. protected function getShopAddress() { $shop_address = ''; $shop_address_obj = $this->shop->getAddress(); if (isset($shop_address_obj) && $shop_address_obj instanceof Address) { $shop_address = AddressFormat::generateAddress($shop_address_obj, [], ' - ', ' '); } return $shop_address; } Tried adding `<br />` tag here but it gets literally printed in the invoice. Not sure why.
  2. That's a pretty bad way to do it. I can see the function supports passing any kind of line break we want. So the modification should be done where this function is being called. Can you tell me where that is?
  3. I need line breaks at specific points, not at random places.
  4. I have added my address through backend - Shop Parameters > Contact > Stores. In there, there are different fields for address line 1, line 2, city, state and so on. In the invoice, this address is displayed in a single line. Is there a way to add some line breaks between different fields I filled out? In pdf/footer.php I have {if isset($shop_details)} {$shop_details|escape:'html':'UTF-8'}<br /> {/if} Where does this $shop_details come from? Can it be messed with? Or are there separate variables available for the different fields? Thanks
  5. I will explain my tax setup here. I have 2 taxes: CGST (6%) SGST (6%) Then I created a tax rule called GST which contains both of the taxes above and mode set to Combine. So the customer should be charged 12% on the order. Then I created an order, the calculations are all correct but in the invoice, the Tax Detail table shows 6% tax rate which should either be 12% or two entries of 6%. Secondly - and this is not necessary but - it would be nice if tax names would be shown in the invoice. Thanks
  6. My theme developers fixed the issue. They removed the hookDisplayHeader function and the line inside is moved into hookHeader function. Here's how it looks like now public function hookHeader($params){ $this->context->controller->addCSS(($this->_path).'posspecialproducts.css', 'all'); $this->context->controller->addJS($this->_path.'js/posspecialproducts.js'); } Hope it helps someone else having a similar issue.
  7. Thanks for your reply. I have cleared cache. The module is hooked properly since the HTML is being loaded. The JS however is not executing. The code of the template and module has not been modified of course. But underlying functionality of Prestashop has sure changed.
  8. My theme was installed and running on PS 1.7.6.X perfectly but I upgraded the shop to 1.7.7.0 recently and one of the sliders on the home page has quit loading altogether. Its an Owl Slider. There are no errors in the console. I tried adding a console.log to the file in question but that also didn't showed up either. I understand there have been some JS related changes in this version but I'm not sure what I'd had to do update my theme to be compatible with this version. Here are some relevant pieces of code: /modules/posspecialproducts/views/templates/hook/posspecialproducts.tpl <div class="pos-special-products "> <!-- HTML of the slider. This is being loaded on the page --> ... </div> /modules/posspecialproducts/posspecialproducts.php <?php if (!defined('_PS_VERSION_')) exit; use PrestaShop\PrestaShop\Core\Module\WidgetInterface; use PrestaShop\PrestaShop\Adapter\Category\CategoryProductSearchProvider; use PrestaShop\PrestaShop\Adapter\Image\ImageRetriever; use PrestaShop\PrestaShop\Adapter\Product\PriceFormatter; use PrestaShop\PrestaShop\Core\Product\ProductListingPresenter; use PrestaShop\PrestaShop\Adapter\Product\ProductColorsRetriever; use PrestaShop\PrestaShop\Adapter\Translator; use PrestaShop\PrestaShop\Adapter\LegacyContext; use PrestaShop\PrestaShop\Core\Product\Search\ProductSearchContext; use PrestaShop\PrestaShop\Core\Product\Search\ProductSearchQuery; use PrestaShop\PrestaShop\Core\Product\Search\SortOrder; class PosSpecialProducts extends Module implements WidgetInterface{ private $token = ''; private $_html = ''; ... public function install() { Configuration::updateValue($this->name . '_limit', 20); ... return parent :: install() && $this->registerHook('displayBlockPosition1') && $this->registerHook('addproduct') && $this->registerHook('updateproduct') && $this->registerHook('deleteproduct') && $this->registerHook('header') // <- is this a problem? && $this->installFixtures(); } public function hookDisplayHeader() { $this->context->controller->addJS($this->_path.'js/posspecialproducts.js'); } ... } /modules/posspecialproducts/js/posspecialproducts.js $(document).ready(function() { var $specialSlideConf = $('.pos-special-products'); ... var specialSlide = $(".pos-special-products .special-item"); console.log(specialSlide); specialSlide.owlCarousel({ ... }); });
  9. Dude I'm not even sure where to begin looking. Can you be a bit more specific? This is not "my" javascript, this is all core prestashop features which is very hard to understand. Can you tell me whats supposed to be in the brackets and where does it come from?
  10. Hi. This part has been working fine until now and nothing has changed that would be relevant for this error to appear. I'm using PS 1.7.6.5 and I have products with combinations. In the screenshots, you can see I have 3 combinations in this product. In the front end though, only 2 appear and clicking on it brings up the red error box saying "An error occurred while processing your request" and doesn't switch variants. In the network tab, I see an ajax request is sent on clicking a variant but the response is a 500 server error showing an error in Mysql statement. Can someone help me with this? Edit: The third combi was not appearing because of an image issue. I've resolved that. But the error on changing it remains.
×
×
  • Create New...