Is there an easier way to fill values fo variants?

  • Posts: 18
  • Thank you received: 3
12 years 4 months ago #56921

According to Product and variant Add/Edit , it says "If you don't set a value in a field of a variant, the main product value will be used." I have products with different prices based on a minimum quantity. To allow the product to be added to the cart, I have to manage each variant and replicate the prices per minimum quantity I did for the main product. Unfortunately, for lots of products, I have options for "color" and "size" and there are lots of colors. This creates a pretty hefty matrix and a even heftier undertaking as I have to go through each combination/variant setting the same minimum quantity and pricing as the main product.

Based on the above link, it sounds like I don't have to go through each variant applying the same minimum quantity and pricing per minimum quantity as in the main product, but it doesn't appear to work for me. I ran across this post where someone mentions the same situation I am facing except the prices are different for the products, so copying a previous product will not help.

Any suggestions beyond what I am currently doing--i.e. editing each variant and replicating the minimum quantity and pricing per minimum quantity?

Many thanks.

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

  • Posts: 82818
  • Thank you received: 13361
  • MODERATOR
12 years 4 months ago #56946

Hi,

You don't need to enter the price for each variant if it's the same as the main product.
Just enter it in the main product and that will work.

If it doesn't seem to work for you, it must be because something is not configured properly. Could you do screenshots of your main product edition page so that we could see how you set the prices of the main product when the variants don't have prices and that it doesn't work ?

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

  • Posts: 18
  • Thank you received: 3
12 years 4 months ago #57008

nicolas, as always, thanks for your quick and very useful response. I am glad to know that. I'm attaching several documents. I added a new product to Hikashop--i.e. Hikashop_Main_Page_No_Variants.pdf. With no variants/characteristics, I went to the site and tried adding the product to the shopping cart, which it did successfully--i.e. Hikashop_Product_Shopping_Cart_No_Variants.pdf. Next, I added 2 characteristics (Imprint Color and Grip Color) to the product. Without clicking Manage Variants, I clicked the SAVE button. I went to the site and attempted to add the product to the shopping cart. The first thing I noticed when I went to the site is the quantity was not showing the minimum quantity I specified--i.e. 400, as seen in Hikashop_Product_Display_With_Variants_Wrong_Quantity.pdf. Even if I type in "400" and click "Add to cart", it will not add the item. To get this working, I've had to click MANAGE VARIANTS (seen in Hikashop_Main_Product_Variants.pdf) and replicate the information I entered on the main product page--i.e. specifically the MINIMUM QUANTITY PER ORDER and PRICES PER MINIMUM QUANTITY (seen in Hikashop_Main_Product_Variants_Number_1_Fix.pdf). Once I duplicate this information and save it, I can go to the site, select the product and have it added to the cart, as seen in Hikashop_Product_Shopping_Cart_With_Variant_Fix.pdf. I only did the fix for the first variant--i.e. Translucent Blue Grip Color and Dark Blue Imprint Color. If I select another combination, the quantity field will revert back to 1.

Hope this helps nicolas.

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

  • Posts: 82818
  • Thank you received: 13361
  • MODERATOR
12 years 4 months ago #57163

Ah yes. This is a minimum quantity issue handling with variants.
It's fixed on our end for next release as it has been reported by other users.

You can replace the file components/com_hikashop/views/product/tmpl/quantity.php and administrator/components/com_hikashop/classes/cart.php by these ones to fix the problems.

Attachments:

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

  • Posts: 18
  • Thank you received: 3
12 years 4 months ago #57226

nicolas, thanks again and glad to know this was a known issue. I'll look forward to the official release. I copied the 2 files you attached to my site, unfortunately it still does not work. The one positive is the minimum quantity is always set correctly when I view the product on my site (Hikashop_Product_With_Variants_Correct_Quantity.png). When I attempt to add the product to the shopping cart, I get the "Limit reached. You can't add the product: <variant_name>". It does add the Options with the correct quantity to the shopping cart but not the product (Hikashop_Product_With_Variants_Shopping_Cart.png). I removed the variants from the product, saved the changes, went back to the product, and re-added the variants; but it made no difference. To fix, I still have to go to MANAGE VARIANTS and replicate the MINIMUM QUANTITY and PRICES PER MINIMUM QUANTITY (Hikashop_Product_Manage_Variants.pdf). Once this is done, I can go to the site and successfully add the product to the shopping cart.

NOTE: The "Limit reached. Quantity reduced for product: Set Up Charge" message seen in the attached is correct. The set up charge is a quantity of 1 per order. Since I'm adding a quantity of 400, it's just letting me know it could not add a quantity of 400 for that 'product'. I'll remove the display of the message before the site goes live as testers have already commented on seeing the message and thinking there was a problem.

Thanks again.

Attachments:

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

  • Posts: 82818
  • Thank you received: 13361
  • MODERATOR
12 years 4 months ago #57439

I tried to replicate on my end but I didn't had the problem.
Can you give a link to that product page so that we can see that ?
And maybe a backend and FTP access ?

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

  • Posts: 18
  • Thank you received: 3
12 years 4 months ago #57512

Thanks nicolas, I sent you a PM with the gory details. I can confirm the 2 files were copied over. The minimum quantity is definitely fixed whenever I view a product but in order to add the product to the shopping cart (after I've added characteristics to the product), I have to manage variants to replicate the minimum quantity and prices per minimum quantity.

Thanks again

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

  • Posts: 82818
  • Thank you received: 13361
  • MODERATOR
12 years 3 months ago #57727

I think I found the problem you have.

Can you change the line:
if($parentProduct->product_min_per_order>1 && $quantity_for_same_main_product<$parentProduct->product_min_per_order-$quantity){

to:
if($parentProduct->product_min_per_order>1 && $quantity_for_same_main_product<$parentProduct->product_min_per_order){

in the administrator/components/com_hikashop/classes/cart.php file ? That should fix the problem.

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

  • Posts: 18
  • Thank you received: 3
12 years 3 months ago #57739

nicolas, thanks for the help with this. I applied the fix, per your instructions, but it still does not work. The line I changed was around 815 of the cart.php file. With one product, I removed the options, saved the product, and re-added the options (assuming this might be necessary). When I went to the front-end to add the product to the cart, it still does not add the product to the shopping cart. Once I go to Manage Variants and replicate the Minimum Quantity and Prices per Minimum Quantity, it will allow the product to be added to the cart.

Here is the code where I applied the fix, just to confirm this was the correct location.

if(!empty($parentProduct->product_min_per_order)){
$quantity_for_same_main_product =& $this->_getGlobalQuantityOfVariants($cartContent,$product);
if($parentProduct->product_min_per_order>1 && $quantity_for_same_main_product<$parentProduct->product_min_per_order){
$quantity = 0;
}
}

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

  • Posts: 82818
  • Thank you received: 13361
  • MODERATOR
12 years 3 months ago #57823

Sorry I switch both piece of code in my message.
It's the other way around.
You need to replace that line by:
if($parentProduct->product_min_per_order>1 && $quantity_for_same_main_product<$parentProduct->product_min_per_order-$quantity){


That should be better :)

The following user(s) said Thank You: tspires

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

  • Posts: 18
  • Thank you received: 3
12 years 3 months ago #58129

Definitely better!!

Thanks, that did the trick.

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

  • Posts: 93
  • Thank you received: 5
12 years 1 week ago #74848

has this been fixed in current business edition of hikacart? as Iam having similar issues (see PM) in regards to what seems like the same problem
we have the Business edition of hikacart Current is this updated with these fixes?.. I looked through the code but it seems different to what is posted above and because this is 3 months old Iam not sure.. if it is wise to fiddle just yet.

the problems Iam having is a new user comes to website.. they order a product, and then proceed to checkout.
they fill in their details and are told that;

Limit reached. You can't add the product:

although the product is set to unlimited. (some products also have variants)

ok.. continued..

afterwards the Registration Page is presented with details as if filled in incorrectly.. but
the user registration has been accepted and they have been logged in.
now they can go back to the cart and add items as per usual.
however they can't log out.!?!?!?
Iam not sure what Iam doing wrong .. something presumably.

I also tried various Registration configurations. but each one has it quirks.
for example , checkout > Registered (Joomla Registration)
if I enable this method, then .. the registration page resets losing all information if they don't first scroll down to bottom and tick (terms and conditions) box, why?

I thought... ok I will move the 'Terms & Conditions' box to the top so its the first thing they do before filling in data with the following workflow;

terms_login_address_shipping_payment_confirm_coupon_cart_status_fields,end


it appeared to work.. yet didn't.

sorry for having so many problems , I know you guys work really hard to maintain and support hikashop. and you do a fantastic job.
Cheers.


you Guys are Awesome and have excellent Support! Keep up the great Work!.
Last edit: 12 years 1 week ago by reace. Reason: typos

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

  • Posts: 82818
  • Thank you received: 13361
  • MODERATOR
12 years 5 days ago #75696

That modification has been added to HikaShop 2.0.0 yes.

You can look at the file and you'll see the line I'm talking about in my previous message:
if($parentProduct->product_min_per_order>1 && $quantity_for_same_main_product<$parentProduct->product_min_per_order-$quantity){

There has been no other reports on that as far as I know since the release. I also tried on your website and didn't had the message.

I tried on my end and I'm able to register even though the terms and condition view is on the same step of the checkout as the login and registration view.
I also tried on your website and it's working fine.

PS: when you move forward on issues, try to put all your posts in the same place and reply to the same thread. Otherwise, other users can't follow what you're saying.

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

Time to create page: 0.071 seconds
Powered by Kunena Forum