chrometweaks.org

How do I import my all post from current blog http://XXXXX.iPage and Wordpress.com to new domain nam

Click Here To View All Answers...


Got a question, hope someone can answer... How do I import my all post from current blog http://XXXXX.iPage and Wordpress.com to new domain nam Looking forward for any response. My 2nd question... OK I thought this would be simple but I'm obviously missing something. The quantity box on product_info.php is exactly what I needed and works like a charm... IF the quantity is at least 1 or greater..

I need customers to be able to enter any quantity > 0 for a fabric website, both as an update from the cart and from the product_info page itself. This is for a shop that sells custom fabric cuts of .25 yard, .33, .50, .66, .75 and of course greater than 1 etc. Client doesn't like the +/- showing up in the shopping cart page when options are used for pricing. iPage site needs heavy mods and doesn't want to play nicely with Free Call for Price mod, as wonderful as FCP looked :cry:.

ANYWAY. I found in includes/classes/shopping_cart.php (in both catalog and admin) this snippet around line 135:.

Reset($this->contents);.

While (list($key,) = each($this->contents)) {.

If ($this->contents[$key]['qty'] < 1) {.

Unset($this->contents[$key]);.

And found that changing the < 1 to < 0 allows addition/price calculation of quantities less than one..

However, if you add to cart and everything is going nicely, after you click check out, then log in or create an account, the cart reverts to 0/empty. If the quantities are 1 or greater, the quantities and products ARE retained just fine..

I searched on < 1 and found about 5 files where it could be changed to < 0 which seem to pertain to products (not addresses or dates etc), but changing those did not help either. I don't even remember what they were anymore, I've been working so many days on this one issue. I also found that with quantities less than 1, one of 2 things happens: You either can't check out (redirects to shopping_cart.php) or once I fixed that, it takes the "0" quantity it reverted to, adds shipping, and allows checkout with 0 products and shipping based on tare weight only... not good lol..

Is there anyone else out there who sells by linear measurements who would find it much simpler to enter quantities on product_info.php, combined with allowing > 0 instead of > 1? This would theoretically eliminate having to enter many different sizes as options with their own prices +FreeCall etc..

I've already tried ripping everything out and installing fresh snapshot from 11 Jan 2003 with about 1/3 of the mods it will eventually need (just has basic stuff like SKU/UPC, Header Tags Controller, WYSIWYG, etc added to the new snapshot so far) - and I still can't figure out how to make the < 1 quantity work..

Client really does *not* want to have to set 1 as minimum quantity on anything..

Help?? Please????.

Thanks,.

Anne..

Comments (10)

Hmm... I need to find out myself. I don't know what is the answer to your question. I'll do some research and get back to you if I discover an useful answer. You should email the people at iPage as they probably know..

Comment #1

Elari, THANK YOU, you are brilliant!!.

Your integer/decimal suggestion was exactly what I needed to set me on the right track. I've told the guy he's probably going to get some joker ordering .05 of everything, but he says that's ok, he wants to offer customers more size choices and doesn't expect that many problems with spurious orders.... :roll:.

Along with a "Yards:" quantity box on product_info.php page, I added a little small-text note that decimal values can be entered, for example .25 for 1/4 yard, .50 for 1/2 yard, 5.75 for 5 3/4 yards, etc..

For anyone else out there who needs to have 0< qty <1 for linear measurements, weights, etc, here's how I did it (with help from Elari!) : Caveat etc: not fully tested but seems to work right through the ordering process for everything so far....

Change < 1 to < 0 in the following files so the lines (approximate line numbers) look like this:.

Catalog/includes/classes/shopping_cart.php line 136.

If ($this->contents[$key]['qty'] < 0) {.

Catalog/checkout_confirmation.php line 22.

If ($cart->count_contents() < 0) {.

Catalog/checkout_payment.php line 22.

If ($cart->count_contents() < 0) {.

Catalog/checkout_payment_address.php line 22.

If ($cart->count_contents() < 0) {.

Catalog/checkout_process.php line 148.

If ($stock_left < 0) {.

Catalog/checkout_shipping.php line 23.

If ($cart->count_contents() < 0) {.

Catalog/checkout_shipping_address.php line 22.

If ($cart->count_contents() < 0) {.

Admin/includes/classes/shopping_cart.php line 126.

If ($this->contents[$key]['qty'] < 0) {.

Change database as below, or set your own decimal values depending on what you want. These are set to 3 decimal places because that's what client wants even though it means selling portions as small as 1/1000 (that may change soon LOL!):.

ALTER TABLE `products` CHANGE `products_quantity` `products_quantity` DECIMAL( 7, 3 ) DEFAULT '0.000' NOT NULL;.

ALTER TABLE `customers_basket` CHANGE `customers_basket_quantity` `customers_basket_quantity` DECIMAL( 7, 3 ) DEFAULT '0.000' NOT NULL;.

ALTER TABLE `products` CHANGE `products_quantity_order_min` `products_quantity_order_min` DECIMAL( 7, 3 ) DEFAULT '0.000' NOT NULL;.

ALTER TABLE `products` CHANGE `products_quantity_order_units` `products_quantity_order_units` DECIMAL( 7, 3 ) DEFAULT '0.000' NOT NULL;.

ALTER TABLE `products` CHANGE `products_ordered` `products_ordered` DECIMAL( 15, 3 ) DEFAULT '0.000' NOT NULL;.

ALTER TABLE `orders_products` CHANGE `products_quantity` `products_quantity` DECIMAL( 7, 3 ) DEFAULT '0.000' NOT NULL;.

And I think that's it..

Anne..

Comment #2

This is what I get when looking at ANY page on my iPage site after installing this mod. It's only after changing the app_top file that this occurs as I can vies my pages with a quantity box there without problems. It's only when I go to add the second part of the script to app_top that this problem arises..

Any suggestions?..

Comment #3

Anyone know why this might be happening?.

I have had a number of people "test drive" the iPage site for me and amazingly they are having problems understanding the part where you need to change the quantity of the product you want and THEN press the update button - I guess the best way around it is to install this script..

I don't know, people who can't figure that out shouldn't be allowed near a computer.

...

Comment #4

OK, I am sorry, I don't mean to "bump" this thread as I know this is against the rules but it keeps vanishing and I imagine the problem to be something rather minor, given that so many people use this mod..

Anyone have any suggestions for me about the above?..

Comment #5

This Mod is just what I need, thank you..

Has any figured out a way to also show the drop down box for attributes on the products listing page? I want to add the "short descriptions in product listing" mod and this will sit along side it very well if I can get it all to work together..

Comment #6

Thanks for that bump. I been searching for that code for a while and it's nice to see others are finding it useful. For all the posters...you make the forum what it is. Keep the good posting. Lates...

Comment #7

Still searching for help with this, if anyone knows..

Thanks!!!!!!!!..

Comment #8

I was able to get the qty box to work in my product.php but I cant seem to control the length of the box? it is set for only two digit by the text field is stretch so that you can place more than 6 digits. How can I get the text field to just display a length for jsut two digits?.

Heres the code:.

<td width="8%" valign="top" class="main"><input type="hidden" name="products_id" value="<?php echo $product_info_values['products_id']; ?>">.

<input type="text" name="cart_quantity" value="1" maxlength="2" size="2">.

</td>.

<td width="92%" valign="top" class="main"><?php echo tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td>.

</table></td>..

Comment #9

Change size to 6 that is the physical box width.

Change maxlength to 4 that is the number of characters/numbers that can be typed in...

Comment #10

Hello modifiying the code from this thread Iam trying list the attributes in a table as opposed to a drop down. I have achieved this with the code below..

Using a quantity box I would then like to be able to add several products with different attributes to the cart at once..

If I add 50 of the second option it works, but it does not for the first option..

Wondering if anyone has tried this..

I would like to think I'm not far off my first contribution.....

//  ADDED ATTRIBUTES MOD.

$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from "TABLE_PRODUCTS_ATTRIBUTES" pa, "TABLE_PRODUCTS_OPTIONS_VALUES" pov where pa.products_id = '"(int)$HTTP_GET_VARS['products_id']"' and pa.options_id = '"$products_options_name['products_options_id']"' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '"$languages_id"'");.

While ($products_options = tep_db_fetch_array($products_options_query)) {.

Echo '<table width="200" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">';.

Echo '<tr>';.

Echo '<td>';.

Echo $products_options['products_options_id'];.

Echo '<input type="text" name="cart_quantity" value="1" maxlength="4" size="6"><input name="id['$products_options_name['products_options_id']']" type="hidden" value="'.$products_options['products_options_values_id'].'">';.

Echo $products_options['products_options_values_name'];.

Echo '<br>';.

Echo '</td>';.

Echo '</tr>';.

Echo '</table>';.

}.

// END ADDED ATTRIBUTES MOD..

Comment #11


This question was taken from a support group/message board and re-posted here so others can learn from it.