Page 1 of 1
Length quantity in Cart2
Posted: Fri May 02, 2014 4:22 pm
by makkart
Hi,
Im using:
Products 2.20.2
Cart2 1.1
Orders 1.15.3
I need to be able to use length as a quantity when adding an item to the cart as well as number of items.
Does anyone have a solution for that?
Thank you
Re: Length quantity in Cart2
Posted: Sun May 04, 2014 8:25 pm
by wmdvanzyl
The default template for cart already provides a text box for the number of items. Am i understanding your question incorrectly?
The length you speak of, is this the Length Units ( as in cm / inches ) provided in CGECommerceBase? In that case try {cgecomm_length_units}
If this length is a Field Definition that you created for your products, then you could look in the detail template - there is a code snippet that outputs just about every aspect of the product:
Code: Select all
{* accessing all of the fields in a list *}
{if count($entry->fields)}
{foreach from=$entry->fields key='name' item='field'}
{$mod->Lang('name')}: {$name}
{$mod->lang('type')}: {$field->type}
{$mod->lang('value')}: {$field->value}
{/if}
Re: Length quantity in Cart2
Posted: Mon May 05, 2014 2:01 pm
by makkart
wmdvanzyl wrote:The default template for cart already provides a text box for the number of items. Am i understanding your question incorrectly?
The length you speak of, is this the Length Units ( as in cm / inches ) provided in CGECommerceBase? In that case try {cgecomm_length_units}
If this length is a Field Definition that you created for your products, then you could look in the detail template - there is a code snippet that outputs just about every aspect of the product:
Code: Select all
{* accessing all of the fields in a list *}
{if count($entry->fields)}
{foreach from=$entry->fields key='name' item='field'}
{$mod->Lang('name')}: {$name}
{$mod->lang('type')}: {$field->type}
{$mod->lang('value')}: {$field->value}
{/if}
Thanks for your answer.
This is what i need.
Lets say I'm selling wooden sticks.
I want my customer to be able to first enter how many stick he wants. That is already possible by default. But then I want another input field so that the customer can specify the length of the sticks (ex 80 cm).
And then in the Cart there will be "5 sticks, 80 cm long".
So I want to add another variable to the cart to handle the length input.
And my question is. Is there any way to do that easily?
Thank you.
Re: Length quantity in Cart2
Posted: Mon May 05, 2014 2:08 pm
by calguy1000
Nope. Sorry, my e-commerce system does not handle that. Each line item is only allowed one quantity.
Re: Length quantity in Cart2
Posted: Mon May 05, 2014 3:45 pm
by makkart
calguy1000 wrote:Nope. Sorry, my e-commerce system does not handle that. Each line item is only allowed one quantity.
Thanks for your answer.
Thats really bad news, I need that to complete my webshop.
Im not handling prices so the only thing I need to do is have an extra input field and that has to be stored in the cart item so it can be displayed on the invoice.
I tried passing it as {$actionid}cart_options but there is a security check (I guess for CSRF) on it so I can't pass my own value.
Since you built it, can you think of any workaround? =)