Jump to content

phingko

Members
  • Posts

    10
  • Joined

  • Last visited

Profile Information

  • Activity
    Agency

phingko's Achievements

Newbie

Newbie (1/14)

1

Reputation

  1. Hi presto, thank you for the reply. I managed to direct my homepage to https://www.domain.com.au, but the rest of the page remains as www.domain.com.au And I just realized the error thrown by Firefox and Chrome are different. In Chrome the error is Impossible to add the product to the cart. textStatus: 'parsererror' errorThrown: 'SyntaxError: 'Unexpected token c' responseText: 9ce The responseText are not always the same though. It will throw this random numbers and chars and the alphabet will be picked up as 'unexpected token' Anyone face this problem before? I don't use paypal on my website and I have deactivated google analytic as other posts suggested but none works.
  2. My website is working fine until this early week, whenever customers try to add a product, it will come out with this error; Impossible to add the product to the cart. textStatus: 'parsererror' errorThrown: 'SyntaxError: JSON.parse: unexpected non-whitespace character after JSON data at line 1 column 3 of the JSON data' responseText: 45b { "products": [ .....} 0 But if I put https://www.domain.com.au instead of www.domain.com.au, the AJAX won't throw any error. There are few speculations I have here, but I have no solutions; what I can think of that there is whitespace I need to delete, but I don't know where. And that the code that I put into my blockcart.php caused it; global $smarty; $smarty->assign('customerDefaultGroup' , Customer::getDefaultGroupId(Context::getContext()->customer->id)); But I tried to comment those out, it still throws me error. SO for now, I disabled the AJAX but customers has started to complain that they are directed to shopping cart every time they add product. And I don't know if this is related, I have random chars on my header every time I access the website. Help
  3. HI, I tried the module from this post ; https://www.prestashop.com/forums/topic/228277-get-customer-group-id-in-smarty/ So I want to show wholesale price when customer log in as wholesale customer which ID is 4, it works fine but the problem is when the customer is not logged in. It appears error that variable $customerdefaultgroup is undefined. in my customer group module, i have this hook header function; public function hookHeader() { global $smarty; $context = Context::getContext(); $id_lang = $context->cart->id_lang; $customer = $context->customer; $id_customer = $customer->id; $groups = Db::getInstance()->executeS("SELECT " ._DB_PREFIX_. "customer_group.id_group , " ._DB_PREFIX_. "group_lang.name FROM " ._DB_PREFIX_. "customer_group LEFT JOIN " ._DB_PREFIX_. "group_lang ON " ._DB_PREFIX_. "group_lang.id_group = " ._DB_PREFIX_. "customer_group.id_group WHERE " ._DB_PREFIX_. "customer_group.id_customer = '$id_customer' AND " ._DB_PREFIX_. "group_lang.id_lang = '$id_lang'"); if(!isset($groups[0])) $groups = FALSE; $smarty->assign('customerGroups', $groups); $defaultGroupId = Configuration::get('PS_CUSTOMER_GROUP'); $customerDefaultGroup = new Group($defaultGroupId); $smarty->assign('customerDefaultGroup' , $customerDefaultGroup); } Then on my product-list.tpl when customer log in as wholesale customer, which is customer group id = 4, it will show the WP price. <a class="lnk_more" href="{$product.link}" title="{l s='View' mod='homefeatured'}">{l s='View' mod='homefeatured'}</a> {if $product.show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE AND isset($cart->id_customer)} <p class="price_container"> {if $customerDefaultGroup>=4}<span class="rrp_price">RRP{convertPrice price=$product.orderprice}</span>{/if} <span class="price" style="float:right;">{if $customerDefaultGroup>=4}WP{else}RRP{/if}{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span> </p> {/if} The funny thing is the code works ok when customer log in, but if a customer doesn't log in and add items to cart, it will appear the error Notice: Undefined index: customerDefaultGroup in /var/www/....../cache/smarty/compile/66/de/fc/66defc1f2bf06d532797e725e346402f7c199a68.file.product-list.tpl.php on line 84 Can anyone help me what's wrong here? I have tried a lot of solution but can't figured out why the error could come out when it's declared. Help!
  4. HI All, I tried the old codes from this old post But none of the work around succeed. It seems that the latest version of blocktopmenu doesn't allow to code to execute. What I want now is to create a submenu on cms and link it to contact us page which has the form. Has anyone tried it beofre and could give me some guidance how to achieve it? Thanks in advance
  5. Thanks igi008 for the reply I tried your code as well, the result is the same, i get blank page instead. Really don't understand why it won't work Shouldn't have upgraded it I guess
  6. Hi, I tried vekia's code but instead my whole website just went blank. May I know the url what kind of format that I need to use? I tried 'www.website.com/contact-us' and '/contact-us' both are not working is it because my cms is under another cms page? so it's actually a sub menu of a cms page. Help!
  7. I want to display my category description on my product category listing page, I used this code; description:{$category->description} But it only showed the 'description:' Can anyone let me know what I did wrong here? Thanks in advanced
  8. Hi All, I have a category cms page where it shows all the cms pages for each category. It's pretty simple; e.g. Drinking Water ChoicesDrinking Water Choices List of pages in Drinking Water Choices: Bottled Water, not the Real Solution Filter the Tap Water What I would like to achieve is to show a paragraph or content preview of each cms page. So it's like a 'read more' content. Can anyone help or guide me how to get that result? Cheers
  9. Hi, I tried to create a home tabs in Prestashop 1.6 by following this tutorial; http://nemops.com/pr...s/#.VMa6J0eUfK0 But I keep getting this error [PrestaShop] Fatal error in module Module.php(1224) : eval()'d : Cannot redeclare psHomeTabs::install() Seems like there is an error when installing, the code for install as below; public function install(){ if (!parent::install()) return false; return true; } Is the code correct? Cheers
  10. Hi, i got this error when I uploading the files to my trial cloud hosting with netRegistry. Fatal error: Class 'FrontController' not found in /clientdata/apache-www/t/e/test.betterhomecare.com.au/www/classes/controller/FrontController.php on line 28 I just moved the files as usual. On Cpanel hosting they are working fine. but when in Cloud, I go that error message. Can anyone help me fix this problem as I only have a week left for this trial account. I want to know how the website performs before paying for it. Thanks in advanced
×
×
  • Create New...