Add Multiple Products to carts

  • Posts: 29
  • Thank you received: 0
10 years 5 months ago #163563

-- url of the page with the problem -- : N/A [Currently in local development]
-- HikaShop version -- : 2.3.1
-- Joomla version -- : 3.3.1
-- PHP version -- : 5.3.28
-- Browser(s) name and version -- : Chrome Version 35.0.1916.153 m


How do I allow user to multiple select items with the amount of qty needed and submit to cart?
Kindly refer to attachment for Sample.

Attachments:
Last edit: 10 years 5 months ago by angelfila.

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

  • Posts: 83045
  • Thank you received: 13406
  • MODERATOR
10 years 5 months ago #163574

Hi,

You can set the "Display the quantity field on the product page" option of the configuration to "global on listings" in the Hikashop configuration.
Then, if you turn on the "display add to cart button" option of your products listings, you'll get one quantity field per product with a main add to cart button.

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

  • Posts: 29
  • Thank you received: 0
10 years 5 months ago #163664

It work wonderful. Is there anyway I could set the qty by default to 1?

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

  • Posts: 29
  • Thank you received: 0
10 years 5 months ago #163721

I manage to resolved this. :)

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

  • Posts: 13201
  • Thank you received: 2322
10 years 5 months ago #163665

Hi,

You have to edit the view "product / add_to_cart_listing" and edit the code line:

		<input id="hikashop_listing_quantity_<?php echo $this->row->product_id;?>" type="text" style="width:40px;" name="data[<?php echo $this->row->product_id;?>]" class="hikashop_listing_quantity_field" value="0" />
To replace value="0" by vlaue="1"

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

  • Posts: 29
  • Thank you received: 0
10 years 5 months ago #163759

I have added the following "custom field" code to checkout>cart.

<td>
<?php echo $this->row->subject; ?>
</td>


The issue I am facing now is that the 1st line of subject is not showing, as shown in "checkout_cart_image.PNG"

Attachments:

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

  • Posts: 12953
  • Thank you received: 1778
10 years 5 months ago #163768

Hello,
And did you set a value for the "subject" custom field of the product "EnglishWise : Conprehension1" ?

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

  • Posts: 29
  • Thank you received: 0
10 years 5 months ago #163855

Yes i did, it is showing up at producting listing with the same code that i add in.

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

  • Posts: 26168
  • Thank you received: 4030
  • MODERATOR
10 years 5 months ago #163856

Hi,

Sure.
As you can see in the code, the variable "$this->row" is set below your code, just before the display of the price.
You have to use "$row->subject" and not "$row->subject".

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.

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

Time to create page: 0.099 seconds
Powered by Kunena Forum