Jump to content

Problems; categories / java issues


Recommended Posts

Afternoon.. I have been trawling the forum for the last few weeks in search of this problem and as yet have nothing.

first off on a few of my pages I get the dreaded categories not showing bug.. I've tried a few things but so far nothing's come up. Tried the quick search module position fix.. all i can assume is its a java error somewhere:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)
Timestamp: Mon, 1 Feb 2010 14:42:45 UTC


Message: Permission denied
Line: 94
Char: 3
Code: 0
URI: https://diaphragmpumpshop.com/modules/blockcart/ajax-cart.js



Permissions on ajax-cart.js atm stand as 777.. The problem seems to persist on different themes too, with or without v1.1 compat. turned on or off. Did wonder if it might possibly be something to do with the Share This button but removing these still gives the same error, and so too with any other references to java I am using in the TPLs...

If anyone fancies a challenge or would like to help I'd be very grateful :)

Link to comment
Share on other sites

An update to this problem, I've found another place where the code is erroring.. on a product page if a product has less than two pictures (and then does not display the extended views box) then the categories box will not show. If I have multiple images on a product item though the categories show without a problem.

Example without cats showing | Example with cats showing

Error being shown is:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)
Timestamp: Thu, 4 Feb 2010 16:30:36 UTC


Message: 'serialScrollNbImagesDisplayed' is undefined
Line: 7
Char: 2
Code: 0
URI: http://diaphragmpumpshop.com/modules/productscategory/js/productscategory.js

Link to comment
Share on other sites

This is a bug in Prestashop, I believe it has been reported and fixed in the latest version.

You can fix it by changing the following line in /modules/productcategory/js/productcategory.js (line #7)

From

    $('#productscategory_scroll_right').css('cursor', position + serialScrollNbImagesDisplayed == serialScrollNbImages ? 'default' : 'pointer').fadeTo(500, position + serialScrollNbImagesDisplayed == serialScrollNbImages ? 0.2 : 1);


To

    $('#productscategory_scroll_right').css('cursor', position + pc_serialScrollNbImagesDisplayed == pc_serialScrollNbImages ? 'default' : 'pointer').fadeTo(500, position + pc_serialScrollNbImagesDisplayed == pc_serialScrollNbImages ? 0.2 : 1);

Link to comment
Share on other sites

Thank you very much Tomerg3, this has solved one of my two java problems!! Excellent info.

Anyone any vague ideas about the ajax-cart.js properties? I contacted my host last night to ask if he had any idea why a JS permission issue might be cropping up, but so far he hasn't got back.

Link to comment
Share on other sites

  • 2 months later...

hey guys.. a fellow member contacted me regarding this issue a week or so ago.... but I can't quite remember how I ended up fixing this one on my system.. or maybe its just settled out on my site, or maybe my host helped out behind the scenes! (He has a habit of doing so..!) Anyway.. besides, I've noticed only on the contact form now, I get this error.

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3)
Timestamp: Wed, 28 Apr 2010 16:17:37 UTC


Message: Permission denied
Line: 94
Char: 3
Code: 0
URI: https://diaphragmpumpshop.com/modules/blockcart/ajax-cart.js



Any help, suggestions, or info would be very much appreciated! Thanks ladies and gents.

Link to comment
Share on other sites

  • 3 weeks later...

sweet nice one tomor, finally got round to checking this one out.. it appears that (and i could be wrong here) the contct-form.php needs to be run on ssl? not sure if this is the case, but basically I had two links to the contact page one was https and one http.. the https page works fine, no errors, the http page throws up the ajax error, plus also re-awakened the dreaded categories not showing bug too (although I do still have you above fix in place).

Not sure if this is a known issue but hopefully it might help someone else on here..! Cheers Tomerg.

Link to comment
Share on other sites

ah ok excellent news, thanks rocky.. haven't had time to get round to actually setting up a working 1.3 yet although its on my list of things to do..! i'm not too rushed until the final release rears its boat race! :)

ta fellas

Link to comment
Share on other sites

  • 2 weeks later...

hey..

there's a section on your page (I don't know what part specifically) that needs to be ran under SSL. so if you go to your website at http:// then yes you have an error, change it too https://domain.com and your problems disappear.

I would look to see what needs the SSL, or perhaps redirect ur http://website.com to a https://website.com. this was also why I was getting the error, as I should have been viewing my contact-form.php as an SSL and not a normal site. i would suggest one of your plug-ins or modifications has caused the fault as generally the site SHOULD run ok on the base domain without SSL... or at least mine does. so that would lead me to think something else is requesting it on ur homepage.

Link to comment
Share on other sites

@Cyprus

I had a look at the call to ajax-cart.js and these were the only changes I could see between PrestaShop v1.2.5 and PrestaShop v1.3. Hopefully it will work. Try changing line 14 of modules/blockcart/blockcart.tpl from:

<script type="text/javascript" src="{$content_dir}modules/blockcart/ajax-cart.js"></script>



to:

{if !$order_page}
<script type="text/javascript" src="{$content_dir}modules/blockcart/ajax-cart.js"></script>
{/if}



and lines 109-110 of modules/blockcart/blockcart.php from:

global $smarty;
$this->smartyAssigns($smarty, $params);



to:

global $smarty, $page_name;

$smarty->assign('order_page', $page_name == 'order');
$this->smartyAssigns($smarty, $params);

Link to comment
Share on other sites

  • 6 months later...
This is a bug in Prestashop, I believe it has been reported and fixed in the latest version.

You can fix it by changing the following line in /modules/productcategory/js/productcategory.js (line #7)

From
    $('#productscategory_scroll_right').css('cursor', position + serialScrollNbImagesDisplayed == serialScrollNbImages ? 'default' : 'pointer').fadeTo(500, position + serialScrollNbImagesDisplayed == serialScrollNbImages ? 0.2 : 1);


To

    $('#productscategory_scroll_right').css('cursor', position + pc_serialScrollNbImagesDisplayed == pc_serialScrollNbImages ? 'default' : 'pointer').fadeTo(500, position + pc_serialScrollNbImagesDisplayed == pc_serialScrollNbImages ? 0.2 : 1);



I had the same problem and your solution worked for me too.
Thank you!
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...