Question on modification

  • Posts: 427
  • Thank you received: 19
6 years 10 months ago #285957

Hi, I made a lot of modifications and removed the excess code, but I want to ask some things that I do not know what they do and if they are needed in my case.

Can you tell me what this code is used for?

<span id="hikashop_product_id_main" class="hikashop_product_id_main">
		<input type="hidden" name="product_id" value="<?php echo $this->element->product_id; ?>" />
	</span>

and I know that this code is used by the cart, but do I need if, I use List view for characteristics ?
<input type="hidden" name="cart_type" id="type" value="cart"/>
	<input type="hidden" name="add" value="1"/>
	<input type="hidden" name="ctrl" value="product"/>
	<input type="hidden" name="task" value="updatecart"/>
	<input type="hidden" name="return_url" value="<?php echo urlencode(base64_encode(urldecode($this->redirect_url)));?>"/>

In view tabular I left only the code for the title, characteristics and vote.
After all the modifications, there are no problems and errors in the product page and in the cart and wishlist but I still ask. :)

Last edit: 6 years 10 months ago by neo191987.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
6 years 10 months ago #285959

Hello,

1 - It's use to know what is the product_id when you submit the product form.
And the span content can be modified when you're using variants in a non-listing mode.

2 - These are used by the add to cart for the global product page.
Even if you have variants in the listing mode ; you might have some products without variants.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: neo191987

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

Time to create page: 0.057 seconds
Powered by Kunena Forum