Zen Cart Logo
Forums / All Other Contributions/Addons / Stocks by attributes

Stocks by attributes

Locked

Views: 251,277

Results 781 to 800 of 1,126
This thread is locked. New replies are disabled.
2 Oct 2009, 8:13 PM
#781
tagyourbaby avatar

tagyourbaby

New Zenner

Join Date:
Feb 2008
Location:
Auckland, NZ
Posts:
53
Plugin Contributions:
0

Stocks by attributes

Is there any easy way to uninstall all the patches etc as i really do need the text one available or is there some altering of code that can be done?

2 Oct 2009, 9:40 PM
#782
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Stocks by attributes

Tagyourbaby:

Is there any easy way to uninstall all the patches etc as i really do need the text one available or is there some altering of code that can be done?Not sure I understand your question..

Which patches are you referring to??

What do you mean by "i really do need the text one"??

If in your second question you are referring to a text attribute, there is no method in any flavor of SBA to tie a text attribute to stock. SBA in it's current flavors is meant to work for tangible types of attributes (such as size, or color). I know this applies to Kurois version,a nd I'm pretty sure it is supposed to applie to the other flavors as well..

If I am understanding you correctly (and you will have to confirm), it sounds like you are looking for the ability to have non-stock bearing attributes along with stock bearing attributes appklied to a product.

For example let's say you have the following product variant:
T-Shirts
Size: Small
Color: Blue
Number in Stock: 6

Customer could select this product combo (Small, Blue T-Shirt) and also be given an option to have the shirt personalized. The product page would include a textbox attribute where the customer could enter the text they want on the t-shirt.

This would require SBA to allow you to flag some product attributes as non-inventory attributes. Now here's the bad news.. If this is the kind of functionality you are looking for, this mod simply will not support that..:no:

2 Oct 2009, 10:12 PM
#783
milobloom avatar

milobloom

Totally Zenned

Join Date:
Feb 2004
Posts:
1,267
Plugin Contributions:
1

Re: Stocks by attributes

I am looking to move the text that says

"In Stock"

Next to the area where the attributes are instead of where it is.
also is there a way to make a square around the entire area?

Well since I am wishing... Also make the background of that block a different color....

Tried and failed miserably.... Here is the unmodified section.

Link
http://www.nothingbutcostumes.com/index.php?main_page=product_info&cPath=3679_3681&products_id=15554

Stock by Attributes mod by decantlor. Code:

<!--bof Add to Cart Box --> <?php if (CUSTOMERS_APPROVAL == 3 and TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE_SHOWROOM == '') { // do nothing } else { ?>
        <?php
$display_qty = (($flag_show_product_info_in_cart_qty == 1 and $_SESSION['cart']->in_cart($_GET['products_id'])) ? '<p>' . PRODUCTS_ORDER_QTY_TEXT_IN_CART . $_SESSION['cart']->get_quantity($_GET['products_id']) . '</p>' : '');
        if ($products_qty_box_status == 0 or $products_quantity_order_max== 1) {
          // hide the quantity box and default to 1
          $the_button = '<input type="hidden" name="cart_quantity" value="1" />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
        } else {
          // show the quantity box
$the_button = PRODUCTS_ORDER_QTY_TEXT . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['products_id'])) . '" maxlength="6" size="4" /><br />' . zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . '<br />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
        }
$display_button = zen_get_buy_now_button($_GET['products_id'], $the_button);

//jstephens added for attribute quantity.
if(PRODUCT_STOCK_ATTRIBUTE_SHOW == 'true' && zen_qty_product_attributes_count((int)$_GET['products_id'])) {
   $output = '';
   include("stock_check.php");
   
   $inf = strlen($output)?$output . '<br />':'';
   $attib_qty2 = <<<ABC
<div id='form_stock_check'>$inf <input type='submit' value='Check Stock' name='stock_check' /> </div> <script> document.getElementById('form_stock_check').style.display = 'none'; </script> ABC;
   $attib_qty1 = <<<ABC
<script> document.write("<div class='attributeQuantity' id='stockTeller'>Checking...</div>"); </script>

ABC;

   $display_qty = $attib_qty1 . $display_qty;;
   
  }

?>

<?php if ($display_qty != '' or $display_button != '') { ?>
<div id="cartAdd">
<?php
  echo $display_qty;
  echo $display_button;
  echo $attib_qty2;
        ?>
      </div>
<?php } // display qty and button ?> <?php } // CUSTOMERS_APPROVAL == 3 ?> <!--eof Add to Cart Box--> <!--bof Attributes Module --> <?php if ($pr_attr->fields['total'] > 0) { ?> <?php /** * display the product atributes */ require($template->get_template_dir('/tpl_modules_attributes.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_attributes.php'); ?> <?php } ?> <!--eof Attributes Module -->
6 Oct 2009, 2:31 AM
#784
qwert302 avatar

qwert302

Zen Follower

Join Date:
Mar 2008
Posts:
148
Plugin Contributions:
0

Re: Stocks by attributes

Does this mod in any way create unique SKUs for each product/attribute combination by appending the attribute onto the base SKU?

I'm searching real hard for a way to sync my Zen Cart with a Quickbook point of sale system, but Zen Cart's attribute system is making it basically impossible, I need separate SKUs for each attribute combination.

Thanks.

6 Oct 2009, 2:33 AM
#785
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Stocks by attributes

Qwert302:

Does this mod in any way create unique SKUs for each product/attribute combination by appending the attribute onto the base SKU?No. :no:

6 Oct 2009, 3:55 AM
#786
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Stocks by attributes

milobloom:

I am looking to move the text that says

"In Stock"

Next to the area where the attributes are instead of where it is.
also is there a way to make a square around the entire area?

Well since I am wishing... Also make the background of that block a different color....

Tried and failed miserably.... Here is the unmodified section.

Link
http://www.nothingbutcostumes.com/index.php?main_page=product_info&cPath=3679_3681&products_id=15554

Stock by Attributes mod by decantlor. Code:You should probably re-post your question in a separate thread.. What you are asking about has more to do with customizing your product info page, and nothing to do with the SBA mod at all..

7 Oct 2009, 5:52 PM
#787
philip937 avatar

philip937

Totally Zenned

Join Date:
Aug 2009
Location:
Bedford, England
Posts:
968
Plugin Contributions:
0

Re: Stocks by attributes

Hi,

I have mass populated my products_with_attributes_stock with all product variant qty's.

I have now realised ALL 4000+ lines need resyncing with the overall product qty.

I there a way for me to run an sql query to do this to ALL lines???

Also, I assume that this needs doing everytime I update my variant qtys.

Many Thanks

Phil

7 Oct 2009, 6:15 PM
#788
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Stocks by attributes

philip937:

I there a way for me to run an sql query to do this to ALL lines???I don't have a SQL script handy that does this, and I would need help myself to construct one (seems there would be a bit of complexity in this kind of update script that is beyond my basic SQL knowledge) but to answer your question generally, yes, you could construct some SQL to do this update..

philip937:

Also, I assume that this needs doing everytime I update my variant qtys.Only if you update the variant quantities via a direct upload..

7 Oct 2009, 6:38 PM
#789
philip937 avatar

philip937

Totally Zenned

Join Date:
Aug 2009
Location:
Bedford, England
Posts:
968
Plugin Contributions:
0

Re: Stocks by attributes

DivaVocals:

I don't have a SQL script handy that does this, and I would need help myself to construct one (seems there would be a bit of complexity in this kind of update script that is beyond my basic SQL knowledge) but to answer your question generally, yes, you could construct some SQL to do this update..

Only if you update the variant quantities via a direct upload..

Does anyone know the query that gets sent to the database when clicking the sync qtys button? If I knew this I should imagine I could simply add this to the end of my update qty syntax???
Posted via Mobile Device

7 Oct 2009, 6:52 PM
#790
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Stocks by attributes

philip937:

Does anyone know the query that gets sent to the database when clicking the sync qtys button? If I knew this I should imagine I could simply add this to the end of my update qty syntax???
Posted via Mobile Device
Don't know why I didn't think of that.. :laugh: I personally don't know the query off the top of my head, but if you dig through the files for this add-on, it should be easy to locate it yourself..:smile:

7 Oct 2009, 7:01 PM
#791
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Stocks by attributes

In the products_with_attributes_stock class you'll find this short function```
function update_parent_products_stock($products_id)
{
global $db;
$query = 'select sum(quantity) as quantity from '.TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK.' where products_id = "'.(int)$products_id.'"';
$quantity = $db->Execute($query);
$query = 'update '.TABLE_PRODUCTS.' set products_quantity="'.$quantity->fields['quantity'].'" where products_id="'.(int)$products_id.'"';
$db->Execute($query);
}


To avoid the php and apply it to all products, you would probably want to create a database view or a temporary table based on the first query and then apply the resulting rows in that to all matching rows in the product table.
7 Oct 2009, 7:13 PM
#792
philip937 avatar

philip937

Totally Zenned

Join Date:
Aug 2009
Location:
Bedford, England
Posts:
968
Plugin Contributions:
0

Re: Stocks by attributes

Thanks kuroi, I shall take a look at this synatx and see if I can create one that repeats the same funtion on all products. So am I right in thinking:

it looks at the attributes qty table and all matching rows of a particular product id, adds up all the corrosponding values in the quantity column and the updates the product id qty with the result in the products table??
Posted via Mobile Device

8 Oct 2009, 4:05 PM
#793
philip937 avatar

philip937

Totally Zenned

Join Date:
Aug 2009
Location:
Bedford, England
Posts:
968
Plugin Contributions:
0

Re: Stocks by attributes

Hi All

I am having an issue with my stock by attributes. When I select Catalog > Products with attributes stock, Most of the timne I get a message saying a script has stopped working? something to do with Ajax??

Also it says: Suchen: ??what does this mean?

has anyone else got this problem, and or know any other problems before I go live with this add on???

Regards,
Phil

8 Oct 2009, 4:23 PM
#794
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Stocks by attributes

Let me answer with a quote from Kuroi.. (who IMO has written the ONLY version of this add-on that is worth installing)

kuroi:

It maynot have all the bells and whistles, but the plain 4.7 version has been thoroughly tested to a professional standard, has no known bugs, and provided it's installed correctly will work fine.
I've posted in this thread what my opinion is about the "others" (AKA the Ajax and the MultiAdd versions of SBA). I won't repeat it, but here's the link:
http://www.zen-cart.com/forum/showpost.php?p=788368&postcount=776

philip937:

Hi All

I am having an issue with my stock by attributes. When I select Catalog > Products with attributes stock, Most of the timne I get a message saying a script has stopped working? something to do with Ajax??

Also it says: Suchen: ??what does this mean?

has anyone else got this problem, and or know any other problems before I go live with this add on???

Regards,
Phil

8 Oct 2009, 4:25 PM
#795
philip937 avatar

philip937

Totally Zenned

Join Date:
Aug 2009
Location:
Bedford, England
Posts:
968
Plugin Contributions:
0

Re: Stocks by attributes

DivaVocals:

Let me answer with a quote from Kuroi.. (who IMO has written the ONLY version of this add-on that is worth installing)

I've posted in this thread what my opinion is about the "others" (AKA the Ajax and the MultiAdd versions of SBA). I won't repeat it, but here's the link:
http://www.zen-cart.com/forum/showpost.php?p=788368&postcount=776

oh dear well I know Kuroi knows their stuff.

In this case, can someone please give me step by step as to how to roll back to 4.7...? I dont want to mess this up...

8 Oct 2009, 4:46 PM
#796
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Stocks by attributes

philip937:

oh dear well I know Kuroi knows their stuff.

In this case, can someone please give me step by step as to how to roll back to 4.7...? I dont want to mess this up...
Yes he does..

I'm afraid no one has written a step by step to remove one of the errant versions of SBA..

Best way to approach this is to open up the folder where you have the source files that you used for your install and one by one open each folder and remove those same files from your store..

That said, I cannot say for sure, but you may be able to simply install the Kuroi version over the Ajax version.. I haven't tried that personally to know if it works..

8 Oct 2009, 5:11 PM
#797
philip937 avatar

philip937

Totally Zenned

Join Date:
Aug 2009
Location:
Bedford, England
Posts:
968
Plugin Contributions:
0

Re: Stocks by attributes

DivaVocals:

Yes he does..

I'm afraid no one has written a step by step to remove one of the errant versions of SBA..

Best way to approach this is to open up the folder where you have the source files that you used for your install and one by one open each folder and remove those same files from your store..

That said, I cannot say for sure, but you may be able to simply install the Kuroi version over the Ajax version.. I haven't tried that personally to know if it works..

where can I obtain a copy of the Kuroi version please?

8 Oct 2009, 6:15 PM
#798
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Stocks by attributes

philip937:

where can I obtain a copy of the Kuroi version please?If you look at the page for Stock By Attributes, scroll down through the previous versions. Find ver 4.7 by Kuroi that does NOT have Ajax or MultiAdd after the version number..

9 Oct 2009, 12:55 PM
#799
decostyle avatar

decostyle

Zen Follower

Join Date:
Mar 2008
Posts:
336
Plugin Contributions:
0

Re: Stocks by attributes

Hi,

I read through the features of Stock by Attributes and only want the feature where it shows how many pieces are available when customer attempts to purchase over the available qty in cart.

Right now when someone tries to purchase over the stock amount per product, the message just says "There is not suffcient amt..." but doesn't really say how many are left for them to purchase. This is frustrating to customer who sometimes do not look at the available stock description on the product info page.

Does anyone know which files these are? Is it possible to just extract this portion and still use the regular stock by product feature of zencart?

I'm using zencart 1.3.8a. Thanks

9 Oct 2009, 2:29 PM
#800
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Stocks by attributes

This should be posted in a separate thread as it is not a Stock By Attributes support question.. You'll probably get more answers that way..

Decostyle:

Hi,

I read through the features of Stock by Attributes and only want the feature where it shows how many pieces are available when customer attempts to purchase over the available qty in cart.

Right now when someone tries to purchase over the stock amount per product, the message just says "There is not suffcient amt..." but doesn't really say how many are left for them to purchase. This is frustrating to customer who sometimes do not look at the available stock description on the product info page.

Does anyone know which files these are? Is it possible to just extract this portion and still use the regular stock by product feature of zencart?

I'm using zencart 1.3.8a. Thanks