- Posts: 6
- Thank you received: 0
Cart redirection error when editing quantity
12 years 11 months ago - 12 years 11 months ago #133137
by bdl888
Cart redirection error when editing quantity was created by bdl888
-- url of the page with the problem -- :
ow.ly/qZ2fr
-- HikaShop version -- :2.2.2
I'm having a problem when editing the quantity in the cart.
My domain is as follows: domainname.org/shop
I can add a product to cart just fine. However, if I try to edit the quantity field (in the cart), the page redirects to a 404:
domainname.org/xxxxxxxx/shop/product ... (should be domainname.org/shop/product ...)
Could you please help?
Thank you.
-- HikaShop version -- :2.2.2
I'm having a problem when editing the quantity in the cart.
My domain is as follows: domainname.org/shop
I can add a product to cart just fine. However, if I try to edit the quantity field (in the cart), the page redirects to a 404:
domainname.org/xxxxxxxx/shop/product ... (should be domainname.org/shop/product ...)
Could you please help?
Thank you.
Last edit: 12 years 11 months ago by bdl888.
Please Log in or Create an account to join the conversation.
12 years 11 months ago #133166
by bdl888
Replied by bdl888 on topic Cart redirection error when editing quantity
It appears to be fine now. I had some weird links in my redirect component. Not sure how those links were created.
Please Log in or Create an account to join the conversation.
12 years 11 months ago #133178
by bdl888
Replied by bdl888 on topic Cart redirection error when editing quantity
Sorry but the problem still happens after I cleared the redirection links....
Please Log in or Create an account to join the conversation.
12 years 11 months ago #133206
by nicolas
Replied by nicolas on topic Cart redirection error when editing quantity
Make sure that you configured the live_site parameter of your joomla configuration.php file with the correct URL of your website and it should help.
Please Log in or Create an account to join the conversation.
12 years 11 months ago - 12 years 11 months ago #133223
by bdl888
Replied by bdl888 on topic Cart redirection error when editing quantity
Hi Nicolas,
Thanks for your reply. The live_site parameter is configured correctly...
Any other ideas?
Alternatively, is there a way to disable quantity editing in the cart module? (Still show the quantity but not allow field editing)
Benjamin
Thanks for your reply. The live_site parameter is configured correctly...
Any other ideas?
Alternatively, is there a way to disable quantity editing in the cart module? (Still show the quantity but not allow field editing)
Benjamin
Last edit: 12 years 11 months ago by bdl888.
Please Log in or Create an account to join the conversation.
12 years 11 months ago #133322
by nicolas
Replied by nicolas on topic Cart redirection error when editing quantity
Hi,
The issue is with the base HTML element which gives a wrong based URL for the page and because of that the links are not correct.
The best would be to have a correct base set by your template (normally it uses the live_site parameter of the config for that).
I can't help precisely on that as I don't know how your template is done.
Regarding disabling the quantity field in the cart, that's quite easy on the other end. Simply change the line:
in the file "cart" of the view "product" via the menu Display>views.
The issue is with the base HTML element which gives a wrong based URL for the page and because of that the links are not correct.
The best would be to have a correct base set by your template (normally it uses the live_site parameter of the config for that).
I can't help precisely on that as I don't know how your template is done.
Regarding disabling the quantity field in the cart, that's quite easy on the other end. Simply change the line:
Code:
<input id="hikashop_cart_quantity_<?php echo $row->cart_product_id;?>" type="text" name="item[<?php echo $row->cart_product_id;?>][cart_product_quantity]" class="hikashop_product_quantity_field" value="<?php echo $row->cart_product_quantity; ?>" onchange="var qty_field = document.getElementById('hikashop_cart_quantity_<?php echo $row->cart_product_id;?>'); if (qty_field){<?php echo $input; ?> } document.<?php echo $form; ?>.submit(); return false;" />
[code]
to:[code]
<?php echo $row->cart_product_quantity; ?><input id="hikashop_cart_quantity_<?php echo $row->cart_product_id;?>" type="hidden" name="item[<?php echo $row->cart_product_id;?>][cart_product_quantity]" class="hikashop_product_quantity_field" value="<?php echo $row->cart_product_quantity; ?>" onchange="var qty_field = document.getElementById('hikashop_cart_quantity_<?php echo $row->cart_product_id;?>'); if (qty_field){<?php echo $input; ?> } document.<?php echo $form; ?>.submit(); return false;" />
The following user(s) said Thank You: bdl888
Please Log in or Create an account to join the conversation.
12 years 11 months ago #133370
by bdl888
Replied by bdl888 on topic Cart redirection error when editing quantity
Thanks Nicolas. I went the 'disable quantity field' route with your code above.
Please Log in or Create an account to join the conversation.
Time to create page: 0.082 seconds