Jump to content

Minimum Quantity Purchase not working


dcmgraphics

Recommended Posts

not sure why, but when I try to add a min. quantity to a product, it doesn't save. If I enter a nubmer 8, then save and go back to it, it's not there. I've tried on several diferent products, trying to add a new generica product, still no luck. I am runing the latest CC 5.2.14. Is there something else I need to check?

Link to comment
Share on other sites

The minimum quantity column was added to the CubeCart_inventory table in CC526.

 

If you upgraded at one point that went through CC526, such as from CC522 to CC5210, it may be the case that only the codebase was upgraded.

 

Please use a database utility such as phpMyAdmin to look at the the structure of the CubeCart_inventory table. Let us know if there is a column named 'minimum_quantity'.

 

If there is not, then your database structure needs to be double-checked to be at a complete CC5214 schema.

 

If there is, then we can look at how the code is behaving.

Link to comment
Share on other sites

There could be the easy way, or the hard way.

 

In the database table, CubeCart_history, please list all the versions. There will be one record for each version for which the setup program has modified the database.

 

The easy way is to remove sufficient records so that the history shows that the latest version is prior to CC526. Then run setup and have the setup procedure update the database to CC5214.

 

The hard way (and it's not all that bad) is to manually execute the SQL statements in the /setup/db/upgrade/ folder using phpMyAdmin.

Link to comment
Share on other sites

Thanks, I really appreciate your help on this.

 

1     5.2.5
2     5.2.7
3     5.2.9
4     5.2.10     
5     5.2.11
6     5.2.12
7     5.2.13
8     5.2.14

 

That sound scary to go back to 5.2.5, that isn't going to mess up anything else in my store?

 

So you are essentially telling me to delete all but the 5.2.5 in the table. Then run set up, where do I get the setup folder? I always delete it after running an update.

Link to comment
Share on other sites

To me, it looks like 5.2.6 is the only entry missing (there was nothing to upgrade in 5.2.8).

 

So, using phpMyAdmin, execute these queries:

 

ALTER TABLE `CubeCart_inventory` ADD `minimum_quantity` INT( 10) NOT NULL DEFAULT '0' ;

UPDATE `CubeCart_email_content` SET `content_html` = REPLACE(`content_html`, '<!--{', '{');
UPDATE `CubeCart_email_content` SET `content_html` = REPLACE(`content_html`, '}-->', '}');
 

 

If your database has a prefix on the table names, be sure to use it.

 

(If you ever need to get a setup folder, download the ZIP package from CubeCart.com.)

Link to comment
Share on other sites

Wow, that worked :) THANK YOU!  But I got this result:

 

ALTER TABLE `CubeCart_inventory` ADD `minimum_quantity` INT( 10) NOT NULL DEFAULT '0' ;# 81 rows affected.

UPDATE `CubeCart_email_content` SET `content_html` = REPLACE(`content_html`, '<!--{', '{');# MySQL returned an empty result set (i.e. zero rows).

UPDATE `CubeCart_email_content` SET `content_html` = REPLACE(`content_html`, '}-->', '}');# MySQL returned an empty result set (i.e. zero rows).

 

 

So not sure what the 'email content' was suppose to fix, but doesn't appear it found anything to fix? Is that something I need to worry about?

Link to comment
Share on other sites

That is interesting, but nothing to worry about.

 

To satisfy our curiosity, however, in admin, Email Templates, click the USA flag for Cart: Order Confirmed.

 

On the HTML Content tab, switch the editor to Source mode. Scroll halfway down.

 

Do you see this:

<!--{foreach from=$PRODUCTS item=product}-->

or this:

{foreach from=$PRODUCTS item=product}
Link to comment
Share on other sites

  • 5 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...