Porting 2.2 addon - Minimum Product Quantity - to 2.3
#1
Posted 28 January 2012, 15:14
I would like some help to port this to osC 2.3.
#2
Posted 28 January 2012, 17:56
#3
Posted 06 February 2012, 20:30
However, I'm confused about steps 16 and 17 (please take a look at the installation instructions I uploaded to PasteBin). It says something about modifying product_listing.php which is nonexistent on osC 2.3. What is it's equivalent file on 2.3? Do I even need to add those lines now?
#4
Posted 06 February 2012, 22:46
#5
Posted 07 February 2012, 06:46
#6
Posted 07 February 2012, 08:25
I am not a coder. OSC has a steep learning curve, but in general the program does work. If it doesnt work, the chances are it is something you have done.
#7
Posted 07 February 2012, 09:01
14steve14, on 07 February 2012, 08:25, said:
I don't need the admin part (I can just table as CSV and reimport on phpMyAdmin, which is way quicker). But if I want to re-release the addon as compatible with 2.3 (with minor changes to some of the instructions), I would need to verify the Admin area works as well. Can you help me?
Anyway, other than the first step the others were quite straightforward since I found the relevant lines where I needed to at MPQ code. But now the shopping cart is spewing out errors at the bottom:
Quote
Any idea what I can do about this? I don't have any solid reason, but I'm guessing the auto update the quantity to the minimum amount is somehow conflicting with the auto price updater. When a product is added, the quantity shown is one, but at the bottom (above the error message) it says the quantity has been updated to the minimum specified. Only after refreshing or returning to the shopping cart displays the quantity updated by MPQ addon (the message disappears, but the error remain).
Edited by oxwivi, 07 February 2012, 09:02.
#9
Posted 07 February 2012, 16:57
//Minimum quantity code
if ($cart_notice) {
?>
<tr>
<td class="stockWarning" align="center"><br><?php echo $cart_notice; ?></td>
</tr>
<?php
}
//End Minimum quantity code
It didn't play well with osC 2.3 stockWarning format, my mistake for not noticing it:
<p class="stockWarning" align="center"><?php echo OUT_OF_STOCK_CANT_CHECKOUT; ?></p>
<p class="stockWarning" align="center"><?php echo $cart_notice; ?></p>
#10
Posted 07 February 2012, 17:00
#11
Posted 07 February 2012, 19:04
This forces the cart to update the quanity for them, if you leave it off, they can continue to checkout without the minimum in their cart.
Hope that helps.
#12
Posted 07 February 2012, 19:20
#13
Posted 07 February 2012, 22:09
Here is an image of me adding an item with a min amount of 25 to my cart...
The message is very clear that there is a minimum and we took extra precaution on the product page to highlight the minimum order if it was greater then 1 so there should be no surprises.
You'll see in the image below my shopping cart in the top nav bar shows 1 item, but the page shows that it has been updated to 25, as soon as you take any action the cart changes to the correct amount, I believe this is because the action of modifying the cart quantity is not processed on click, rather when cart is viewed.
Attached Files
Edited by NodsDorf, 07 February 2012, 22:10.
#14
Posted 08 February 2012, 09:03
Is it possible to make it process on adding to cart, rather than when the cart is viewed? I wonder if the function responsible for adding to cart can take care of the numbers added, which basically corresponds to the minimum order.
#15
Posted 08 February 2012, 13:50
#16
Posted 08 February 2012, 14:18
Edited by oxwivi, 08 February 2012, 14:21.
#17
Posted 08 February 2012, 16:18
I only had to modify it slightly to account for quanity price breaks, but its the same. I honestly dont' think I can help any more without looking at it.
Good Luck,
Don
#18
Posted 08 February 2012, 16:38
By the way, are you using the admin controls (didn't attempt to install it as I don't need it)? If yes, the whole thing can be more or less evaluated as working under 2.3.1. You can rerelease the addon as 2.3.1 compatible. I will help modifying the instructions.
Attached Files
#19
Posted 08 February 2012, 20:05
#20
Posted 09 February 2012, 07:06
By clicking anything, do you mean navigating away (i.e. clicking on the links)? If that's case, yes, it's more or less the same thing as refreshing when you return to the shopping cart. Otherwise, clicking randomly on non-interactive area (background, etc) doesn't yield any effect to the quantity box.
















