Cart redirection error when editing quantity

  • Posts: 6
  • Thank you received: 0
11 years 6 months ago #133137

-- 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.

Last edit: 11 years 6 months ago by bdl888.

Please Log in or Create an account to join the conversation.

  • Posts: 6
  • Thank you received: 0
11 years 6 months ago #133166

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.

  • Posts: 6
  • Thank you received: 0
11 years 6 months ago #133178

Sorry but the problem still happens after I cleared the redirection links....

Please Log in or Create an account to join the conversation.

  • Posts: 83933
  • Thank you received: 13588
  • MODERATOR
11 years 6 months ago #133206

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.

  • Posts: 6
  • Thank you received: 0
11 years 6 months ago #133223

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

Last edit: 11 years 6 months ago by bdl888.

Please Log in or Create an account to join the conversation.

  • Posts: 83933
  • Thank you received: 13588
  • MODERATOR
11 years 6 months ago #133322

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:

<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;" />
in the file "cart" of the view "product" via the menu Display>views.

The following user(s) said Thank You: bdl888

Please Log in or Create an account to join the conversation.

  • Posts: 6
  • Thank you received: 0
11 years 6 months ago #133370

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.070 seconds
Powered by Kunena Forum