Jump to content

andref

Members
  • Posts

    9
  • Joined

  • Last visited

Profile Information

  • First Name
    Andre
  • Last Name
    Forte

andref's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hello there, I've came across an error on my PrestaShop store a few days ago and I tried everything I could think of to resolve it with no luck... That's why I'm here to seek some help of the forum. I'll try to explain the error the best that I can. If you go to my website (semprein.net) everything look ok and working, when you go to a category page for the first time the category page loads just fine and you can browse the products, go back, go to a different category, etc... The problem is if you refresh the page, or go back to this category from another page on the website, the page gives me a blank page with a "Fatal Error" message (you can try with the link I posted) this happens always on the second time you try to load a category page... If you go to the page the next day it works the first time again but gives the error on the second. I get no errors in the logs or console... I turned on debug mode, when I refresh the page I don't get the Fatal Error but get a PHP Notice Notice: Undefined index: id_customer in /home/pg40034/public_html/modules/blockwishlist/blockwishlist.php on line 320 Then I tried to deactivate the wishlist module... Then another slider module I have... After some fiddling arround, as I refresh the page or go there a second time I don't get the Fatal Error but some images do not load like the logo image, javascript doesn't work... Some problem persists even doing this... And I have no idea how to solve this and need help. I tried clearing caches, different browsers and devices with the same result. This is a multistore installation of 2 stores, the other (semprein.pt) is working with no problems or errors. I hope I could explain myself, and some of you can help me out as I have no clue how to solve this issue. Thank you in advance, best regards!
  2. Hello there, I'm trying to achive the following: On the availability options of my products, I have some text that displays when the product is in stock and is available to order, and some text on other products to display when there is out of stock but is available to order, both set in the product back office options. What I want is to display some text when neither of the two fields have text to display, I'm doing this in the product.tpl and have the following code: <div> <p id="availability_statut"{if !$PS_STOCK_MANAGEMENT || ($product->quantity <= 0 && !$product->available_later && $allow_oosp) || ($product->quantity > 0 && !$product->available_now) || !$product->available_for_order || $PS_CATALOG_MODE} style="display: none;"{/if}> {*<span id="availability_label">{l s='Availability:'}</span>*} <span id="availability_value" class="label{if $product->quantity <= 0 && !$allow_oosp} label-danger{elseif $product->quantity <= 0} label-warning{else} label-success{/if}"> {if $product->quantity <= 0} {if $PS_STOCK_MANAGEMENT && $allow_oosp} {$product->available_later} {else} {l s='This product is no longer in stock'} {/if} {elseif $PS_STOCK_MANAGEMENT} {if !isset($product->available_now)} {l s='Envio Imediato'} {else} {$product->available_now} {/if} {/if}</span> </p> </div> I've modified a bit of the template code to acommodate my condition but it doens't work! I've tried a few diferent ways but with no luck, all the other "normal" label display correctly but not my text, it seems that it isn't checking if the $product->available_now is empty or not... If someone have any ideas I would really appreciate it! Thank You.
  3. Doesn't work either... I'm going to change my plans and put this on the product template, it's easier and cleaner that way. Thank you for your help.
  4. Yes, as I said in the original post, I'm making a module that is hooked to the ExtraRight hook in the product page. And as I said in the second reply I used {$product->price} Which returns me the price without taxes, but I need the price with taxes included. Any ideas on this? Thank You.
  5. I've tried that, I've tried: {if $productPrice >= 35} <div>...</div> {else} <div>...</div> {/if} And nohting happens... And tried just to display the price: {$productPrice} I tried this on the product page on other place than the price block and it returns the price that I want with taxes, but when I use it in the template file of the hook ExtraRight it returns nothing, I don't know why, it is on the product page and it should have access to that Thank You.
  6. That was my first move, go to product.tpl and "copy" what was done there, but I couldn't figure out how after trying a bunch of diferent things. I'm not using diferent prices for diferent groups. I tried, as used in the product.tpl {$productPrice} But that does't work. I tested all my code to display the price of the product on the page just to see if it was returning what the price as I wanted, and with this it doesn't return nothing. Thank You.
  7. Hello there, I'm making a module to display some shipping information on the product page, I've hooked the module to "ExtraRight" to show up in the product page. I have most of what I want working apart from one thing. I want to check if the price of the product is higher than 35€ displays something and if it's lower display something else. I've tried a bunch of diferent code snippets without any luck, I can get the price without taxes, but I need to check the price with taxes included, and that's my problem, I can't get the price with the taxes included. Here's the code I have that get's me the price without taxes. I'm working on the tpl file of the module. Using PS 1.6.1.16 {if $product->price >= 35} <div> Something </div> {else} <div> Something else </div> {/if} I've tried several diferent variables with no luck. If anyone could help me I would really appreciate it. Thank You!
  8. That did it! When we think we're doind the right thing and it just isn't needed... Thank you so much!
  9. Hello there, I'm making a module to add a custom page to my store, I've got the module and page working as I want with url_rewrite disabled. But I want to use friendly url's, for this I activated them and added the page in BO->SEO&URLS with title and rewrite slug, but it's not working, I get a 404 error and the url changes. I tried a bunch of direferent things and research for hours online, so this is my last hope. (Just to mention, I got the page working before activating the friendly url's) Now some code; I'm using PrestaShop 1.6 Module PHP file: <?php if (!defined('_PS_VERSION_')) { exit; } class InCustomPages extends Module { public function __construct() { $this->name = 'incustompages'; $this->tab = 'front_office_features'; $this->version = '1.0.0'; $this->author = 'Andre Forte'; $this->need_instance = 0; $this->ps_version_compliancy = array('min' => '1.6', 'max' => _PS_VERSION_); $this->bootstrap = true; parent::__construct(); $this->displayName = $this->l('In Custom Pages'); $this->description = $this->l('Custom Pages for SempreIn.'); $this->confirmationUninstall = $this->l('Are you sure you want to uninstall?'); } public function install() { if (!parent::install()) return false; return true; } public function uninstall() { if (!parent::uninstall()) return false; return true; } } My Controller PHP: <?php class incustompagesNewsletterModuleFrontController extends ModuleFrontController { public $php_self = 'newsletter'; public function init() { $this->page_name = 'newsletter'; $this->display_column_left = false; parent::init(); } public function initContent() { parent::initContent(); $this->setTemplate('newsletter.tpl'); } public function setMedia() { parent::setMedia(); $this->addCSS(__PS_BASE_URI__.'modules/'.$this->module->name.'/css/'.$this->module->name.'.css'); } } I've added the page in BO->SEO & URLs with proper title and url rewrite "newsletter" The url should work like www.mysite.com/newsletter But it doesn't, I get a 404 error and the url changes to www.mysite.com/index.php?controller=newsletter&module=incustompages I hope I was clear on my problem and hope someone can help me out. Thank you in advance!
×
×
  • Create New...