Jump to content

[SOLVED] Wishlist does nothing when clicked


5haun

Recommended Posts

Hi

 

The wishlist does not when the link is clicked on the product page it does nothing. I can create a wishlist but also can't delete it. I tried to reinstall it but that didn't help.

 

Wishlist block v1.3.2

 

Console: [HTTP/1.1 500 Internal Server Error 124ms]

 

Here's the config info:

PrestaShop version 1.6.1.4

Current theme in use transformer

Server information Linux #1 SMP Wed Feb 12 00:41:43 UTC 2014 x86_64

Server software version Apache

PHP version 5.5.34

Memory limit 128M

Max execution time 600

Updated files (3)

  • manager/themes/default/css/overrides.css
  • config/config.inc.php
  • config/defines.inc.php

I aslo changed a file for "Form builder pro" override/controllers/front/ProductController.php

From:

<?php
class ProductController extends ProductControllerCore
{
    /*
    * module: stoverride
    * date: 2016-01-27 13:43:16
    * version: 1.1.0
    */
    public function initContent()
	{
		parent::initContent();
        if(!$this->display_column_left && !$this->display_column_right && Configuration::get('STSN_PRODUCT_SECONDARY'))
            $this->context->smarty->assign(array(   
    			'HOOK_PRODUCT_SECONDARY_COLUMN' => Hook::exec('displayProductSecondaryColumn'),     
    		));
        $this->context->smarty->assign(array(
            'show_brand_logo' => Configuration::get('STSN_SHOW_BRAND_LOGO'),
        ));
	}
}

To:

<?php
/**
* This file will override class ProductController. Do not modify this file if you want to upgrade the module in future
*
* @author    Globo Software Solution JSC <[email protected]>
* @copyright 2015 GreenWeb Team
* @link      http://www.globosoftware.net
* @license   please read license in file license.txt
*/
class ProductController extends ProductControllerCore
{
    /*
    * module: gformbuilderpro
    * date: 2016-08-25 18:39:52
    * version: 1.0.3
    */
    public function initContent()
    {
        parent::initContent();
        if (!$this->errors) {
            if (Pack::isPack((int)$this->product->id) && !Pack::isInStock((int)$this->product->id)) {
                $this->product->quantity = 0;
            }
            $this->product->description = $this->transformDescriptionWithImg($this->product->description);
            
            if(Module::isInstalled('gformbuilderpro') && Module::isEnabled('gformbuilderpro'))
            {
            $formObj = Module::getInstanceByName('gformbuilderpro');
            $this->product->description = $formObj->getFormByShortCode($this->product->description);
            $this->product->description_short = $formObj->getFormByShortCode($this->product->description_short);
            }
            
            $this->context->smarty->assign('virtual', ProductDownload::getIdFromIdProduct((int)$this->product->id));
            $this->context->smarty->assign('customizationFormTarget', Tools::safeOutput(urldecode($_SERVER['REQUEST_URI'])));
            if (Tools::isSubmit('submitCustomizedDatas')) {
                if (!$this->context->cart->id && isset($_COOKIE[$this->context->cookie->getName()])) {
                    $this->context->cart->add();
                    $this->context->cookie->id_cart = (int)$this->context->cart->id;
                }
                $this->pictureUpload();
                $this->textRecord();
                $this->formTargetFormat();
            } elseif (Tools::getIsset('deletePicture') && !$this->context->cart->deleteCustomizationToProduct($this->product->id, Tools::getValue('deletePicture'))) {
                $this->errors[] = Tools::displayError('An error occurred while deleting the selected picture.');
            }
            $pictures = array();
            $text_fields = array();
            if ($this->product->customizable) {
                $files = $this->context->cart->getProductCustomization($this->product->id, Product::CUSTOMIZE_FILE, true);
                foreach ($files as $file) {
                    $pictures['pictures_'.$this->product->id.'_'.$file['index']] = $file['value'];
                }
                $texts = $this->context->cart->getProductCustomization($this->product->id, Product::CUSTOMIZE_TEXTFIELD, true);
                foreach ($texts as $text_field) {
                    $text_fields['textFields_'.$this->product->id.'_'.$text_field['index']] = str_replace('<br />', "\n", $text_field['value']);
                }
            }
            $this->context->smarty->assign(array(
                'pictures' => $pictures,
                'textFields' => $text_fields));
            $this->product->customization_required = false;
            $customization_fields = $this->product->customizable ? $this->product->getCustomizationFields($this->context->language->id) : false;
            if (is_array($customization_fields)) {
                foreach ($customization_fields as $customization_field) {
                    if ($this->product->customization_required = $customization_field['required']) {
                        break;
                    }
                }
            }
            $this->assignCategory();
            $this->assignPriceAndTax();
            $this->assignImages();
            $this->assignAttributesGroups();
            $this->assignAttributesCombinations();
            $pack_items = Pack::isPack($this->product->id) ? Pack::getItemTable($this->product->id, $this->context->language->id, true) : array();
            $this->context->smarty->assign('packItems', $pack_items);
            $this->context->smarty->assign('packs', Pack::getPacksTable($this->product->id, $this->context->language->id, true, 1));
            if (isset($this->category->id) && $this->category->id) {
                $return_link = Tools::safeOutput($this->context->link->getCategoryLink($this->category));
            } else {
                $return_link = 'javascript: history.back();';
            }
            $accessories = $this->product->getAccessories($this->context->language->id);
            if ($this->product->cache_is_pack || count($accessories)) {
                $this->context->controller->addCSS(_THEME_CSS_DIR_.'product_list.css');
            }
            if ($this->product->customizable) {
                $customization_datas = $this->context->cart->getProductCustomization($this->product->id, null, true);
            }
            $this->context->smarty->assign(array(
                'stock_management' => Configuration::get('PS_STOCK_MANAGEMENT'),
                'customizationFields' => $customization_fields,
                'id_customization' => empty($customization_datas) ? null : $customization_datas[0]['id_customization'],
                'accessories' => $accessories,
                'return_link' => $return_link,
                'product' => $this->product,
                'product_manufacturer' => new Manufacturer((int)$this->product->id_manufacturer, $this->context->language->id),
                'token' => Tools::getToken(false),
                'features' => $this->product->getFrontFeatures($this->context->language->id),
                'attachments' => (($this->product->cache_has_attachments) ? $this->product->getAttachments($this->context->language->id) : array()),
                'allow_oosp' => $this->product->isAvailableWhenOutOfStock((int)$this->product->out_of_stock),
                'last_qties' =>  (int)Configuration::get('PS_LAST_QTIES'),
                'HOOK_EXTRA_LEFT' => Hook::exec('displayLeftColumnProduct'),
                'HOOK_EXTRA_RIGHT' => Hook::exec('displayRightColumnProduct'),
                'HOOK_PRODUCT_OOS' => Hook::exec('actionProductOutOfStock', array('product' => $this->product)),
                'HOOK_PRODUCT_ACTIONS' => Hook::exec('displayProductButtons', array('product' => $this->product)),
                'HOOK_PRODUCT_TAB' =>  Hook::exec('displayProductTab', array('product' => $this->product)),
                'HOOK_PRODUCT_TAB_CONTENT' =>  Hook::exec('displayProductTabContent', array('product' => $this->product)),
                'HOOK_PRODUCT_CONTENT' =>  Hook::exec('displayProductContent', array('product' => $this->product)),
                'display_qties' => (int)Configuration::get('PS_DISPLAY_QTIES'),
                'display_ht' => !Tax::excludeTaxeOption(),
                'jqZoomEnabled' => Configuration::get('PS_DISPLAY_JQZOOM'),
                'ENT_NOQUOTES' => ENT_NOQUOTES,
                'outOfStockAllowed' => (int)Configuration::get('PS_ORDER_OUT_OF_STOCK'),
                'errors' => $this->errors,
                'body_classes' => array(
                    $this->php_self.'-'.$this->product->id,
                    $this->php_self.'-'.$this->product->link_rewrite,
                    'category-'.(isset($this->category) ? $this->category->id : ''),
                    'category-'.(isset($this->category) ? $this->category->getFieldByLang('link_rewrite') : '')
                ),
                'display_discount_price' => Configuration::get('PS_DISPLAY_DISCOUNT_PRICE'),
            ));
        }
        if(!$this->display_column_left && !$this->display_column_right && Configuration::get('STSN_PRODUCT_SECONDARY'))
            $this->context->smarty->assign(array(   
                'HOOK_PRODUCT_SECONDARY_COLUMN' => Hook::exec('displayProductSecondaryColumn'),     
            ));
        $this->context->smarty->assign(array(
            'show_brand_logo' => Configuration::get('STSN_SHOW_BRAND_LOGO'),
        ));
        $this->setTemplate(_PS_THEME_DIR_.'product.tpl');
    }
}

Any help would be greatly appreciated!

Edited by 5haun (see edit history)
Link to comment
Share on other sites

Hi

 

this file http://moringaworld.webskill.co.za/modules/blockwishlist/cart.php is causing that 500 error

like El Patron said so first check modules folder permissions and that file too.

 

If debug mode is active is bit strange to not show any error. So check maybe your root folder

and file error.log if maybe holds some error that could lead to real issue.

  • Like 2
Link to comment
Share on other sites

Hi

 

this file [[removed]] is causing that 500 error

like El Patron said so first check modules folder permissions and that file too.

 

If debug mode is active is bit strange to not show any error. So check maybe your root folder

and file error.log if maybe holds some error that could lead to real issue.

 

Solved! Was a folder permission issue. Thank you so much for your help!

Edited by 5haun (see edit history)
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...