Zen Cart Logo
Forums / All Other Contributions/Addons / Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Views: 658,526

Results 1,481 to 1,500 of 3,609
5 Mar 2012, 9:12 PM
#1481
creinold avatar

creinold

Zen Follower

Join Date:
Sep 2008
Location:
North Highlands, California 95660
Posts:
287
Plugin Contributions:
0

Stock by Attribute v4.0 addon for v1.3.5-1.3.9

the duplicate attributes drop down is from tpl_modules_attributes.php

I still got to troubleshoot it. looks like the settings on line 17 is in it twice (its also on line 46ish.) Could be the problem but I am not at home to test it.

Ajax is not enabled for the dynamic drop down. Just the admin page settings.

Thanks for the SQL fix. can't believe it was one darn word that was messing me up! LOL

5 Mar 2012, 9:27 PM
#1482
sheryll avatar

sheryll

New Zenner

Join Date:
Dec 2009
Location:
New York, NY
Posts:
45
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

lol! it's always the ones that are hiding in plain sight that cause the problem =]

I also fixed the tpl_modules_attributes.php page, and yes attributes options was listed twice:

<?php
/**
 * Module Template
 *
 * Template used to render attribute display/input fields
 *
 * @package templateSystem
 * @copyright Copyright 2003-2005 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_modules_attributes.php 3208 2006-03-19 16:48:57Z birdbrain $
 */
?>
<div id="productAttributes">
<?php if ($zv_display_select_option > 0) { ?>
<?php
$products_attributes = $db->Execute("select count(distinct products_options_id) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$_GET['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = ". (int)$_SESSION['languages_id'] ."");


     if ($products_attributes->fields['total'] > 1)  {
    
      $products_id=(preg_match("/^\d{1,10}(\{\d{1,10}\}\d{1,10})*$/",$_GET['products_id']) ? $_GET['products_id'] : (int)$_GET['products_id']); 
     require(DIR_WS_CLASSES . 'pad_' . PRODINFO_ATTRIBUTE_PLUGIN_MULTI . '.php');
      $class = 'pad_' . PRODINFO_ATTRIBUTE_PLUGIN_MULTI;

     $pad = new $class($products_id);
     
     echo $pad->draw();

  }
  elseif ($products_attributes->fields['total'] > 0)  {
    
      $products_id=(preg_match("/^\d{1,10}(\{\d{1,10}\}\d{1,10})*$/",$_GET['products_id']) ? $_GET['products_id'] : (int)$_GET['products_id']); 
     require(DIR_WS_CLASSES . 'pad_' . PRODINFO_ATTRIBUTE_PLUGIN_SINGLE . '.php');
      $class = 'pad_' . PRODINFO_ATTRIBUTE_PLUGIN_SINGLE;

     $pad = new $class($products_id);
     
     echo $pad->draw();
  }


?>

<?php
if ($options_attributes_image[$i] != '') {
?>
<?php echo $options_attributes_image[$i]; ?>
<?php
}
?>
<br class="clearBoth" />
<?php
    }
?>


<?php
  if ($show_onetime_charges_description == 'true') {
?>
    <div class="wrapperAttribsOneTime"><?php echo TEXT_ONETIME_CHARGE_SYMBOL . TEXT_ONETIME_CHARGE_DESCRIPTION; ?></div>
<?php } ?>


<?php
  if ($show_attributes_qty_prices_description == 'true') {
?>
    <div class="wrapperAttribsQtyPrices"><?php echo zen_image(DIR_WS_TEMPLATE_ICONS . 'icon_status_green.gif', TEXT_ATTRIBUTES_QTY_PRICE_HELP_LINK, 10, 10) . ' ' . '<a href="javascript:popupWindowPrice(\'' . zen_href_link(FILENAME_POPUP_ATTRIBUTES_QTY_PRICES, 'products_id=' . $_GET['products_id'] . '&products_tax_class_id=' . $products_tax_class_id) . '\')">' . TEXT_ATTRIBUTES_QTY_PRICE_HELP_LINK . '</a>'; ?></div>
<?php } ?>
</div>

I think that's about it. Dynamic Drop Down ajax menu is working, Stock by Attributes is working, the product with their attributes are displaying on the order, stock is being deducted accordingly from the DB, I'm receiving order confirmation emails.

Thanks again creinold! :clap:

5 Mar 2012, 9:35 PM
#1483
creinold avatar

creinold

Zen Follower

Join Date:
Sep 2008
Location:
North Highlands, California 95660
Posts:
287
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Glad you got it working. I will update my alpha version tonight when i get home. =)

5 Mar 2012, 9:56 PM
#1484
sheryll avatar

sheryll

New Zenner

Join Date:
Dec 2009
Location:
New York, NY
Posts:
45
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Found one more thing to add to includes/languages/english/your_template_name_/product_info.php

Find:

define('TEXT_OUT_OF_STOCK_MESSAGE', 'The combination of options you have selected is currently out of stock. Please select another combination.');

Add after:

define('TEXT_SELECT_OPTIONS', 'Please select a preference for each option before proceeding');

This is for customers who tries to click add to cart button before selecting all options.

5 Mar 2012, 10:00 PM
#1485
creinold avatar

creinold

Zen Follower

Join Date:
Sep 2008
Location:
North Highlands, California 95660
Posts:
287
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Someone is on a roll. :wink:

6 Mar 2012, 10:40 AM
#1487
callmeal avatar

callmeal

New Zenner

Join Date:
Mar 2012
Posts:
42
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Sheryll:

To register the page here's the edit:

Register the pages for Admin Access Control

INSERT IGNORE INTO admin_pages (page_key, language_key, main_page, page_params, menu_key, display_on_menu, sort_order) VALUES ('products with attributes stock', 'BOX_PRODUCTS_WITH_ATTRIBUTES_STOCK', 'FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK', '', 'catalog', 'Y', 100);

> 
> remove 'CATALOG' from 'language_key': 'BOX_CATALOG_PRODUCTS_WITH_ATTRIBUTES_STOCK' should be 'BOX_PRODUCTS_WITH_ATTRIBUTES_STOCK'
> 
> -OR-
> 
> To do it manually on Admin Page Registration page, enter the following values:
> 
> Page Key: products with attributes stock
> Page Name: BOX_PRODUCTS_WITH_ATTRIBUTES_STOCK
> Page Filename: FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK
> Page Parameters: [leave blank]
> Menu (select): Catalog
> Display on Menu?: [check]
> Sort Order: 999


Was this for me? If so... what does it mean... sorry!
6 Mar 2012, 5:49 PM
#1488
creinold avatar

creinold

Zen Follower

Join Date:
Sep 2008
Location:
North Highlands, California 95660
Posts:
287
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

callmeal:

Was this for me? If so... what does it mean... sorry!

If you are running Zen-Cart 1.5.0 then it would be. ;)

7 Mar 2012, 2:24 AM
#1489
callmeal avatar

callmeal

New Zenner

Join Date:
Mar 2012
Posts:
42
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

creinold:

If you are running Zen-Cart 1.5.0 then it would be. ;)

Phew - ok then it's fine that I didn't understand a word of it!

Can anybody help me with my problem on Version: 1.4.14 in post 1479? I just can't figure out why it won't show up on my web page even though the menus are in my zen cart :(

7 Mar 2012, 5:47 AM
#1490
slyrick avatar

slyrick

New Zenner

Join Date:
Feb 2012
Posts:
5
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Thanks for all the help so far guys, I've got to the point now where customers can choose an item by it's attribute and it'll deduct from the database etc etc and I know that by going to the stock by attributes page (By typing the link manually) that this area's still working fine.

But for the life of me it still won't show in the catalog drop down. I've tried both of Sheryll's methods of getting it to show with no luck.

Ideas?? Also I installed your lastest Alpha version of plugin.

7 Mar 2012, 7:10 AM
#1491
chargin avatar

chargin

Zen Follower

Join Date:
Sep 2011
Posts:
136
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Need help please..
Ive installed this mod on another site no problem, so I understand how it all works.
But Ive just installed it on a second site and after completing all the steps can now no longer access admin. All I get is a white page in Firefox, IE shows -The website cannot display the page HTTP 500.

Its like a URL error or htaccess or something?
I have since tried uploading the entire standard admin folder and that didnt fix it to my amazement.

Im running 1.3.9h. Theres a few other mods, IH2, admin_profiles_v1_1_1 and some other simple ones that shouldnt effect this.

How can I fix this? Might it be the sql patch? I did run it before uploading the files as instructed.

7 Mar 2012, 4:53 PM
#1492
divavocals avatar

divavocals

Totally Zenned

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

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Chargin:

Need help please..
Ive installed this mod on another site no problem, so I understand how it all works.
But Ive just installed it on a second site and after completing all the steps can now no longer access admin. All I get is a white page in Firefox, IE shows -The website cannot display the page HTTP 500.

Its like a URL error or htaccess or something?
I have since tried uploading the entire standard admin folder and that didnt fix it to my amazement.

Im running 1.3.9h. Theres a few other mods, IH2, admin_profiles_v1_1_1 and some other simple ones that shouldnt effect this.

How can I fix this? Might it be the sql patch? I did run it before uploading the files as instructed.Since there are FOUR versions of this mod floating around, you will need to say which one of these you installed..

7 Mar 2012, 7:26 PM
#1493
creinold avatar

creinold

Zen Follower

Join Date:
Sep 2008
Location:
North Highlands, California 95660
Posts:
287
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Good trouble shooting hint. Since your main website is the problem. Delete/ and reinstall original overwrite files in the include folder one at a time. Check/refresh website untill site comes back up. Then you'll know what file is causing this. I would start with includes/functions/functions_lookups.php

8 Mar 2012, 12:31 AM
#1494
chargin avatar

chargin

Zen Follower

Join Date:
Sep 2011
Posts:
136
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Ok it looks like it was NOT the attributes mod. Ive totally uninstalled the admin profiles mod and now Im able to login again.
Very strange though because the admin profiles mod was working fine until I installed the attributes mod. Perhaps they arent compatable? I used the latest one I could find via the "Free software addons" link.

Thanks for replies.

8 Mar 2012, 3:36 AM
#1495
creinold avatar

creinold

Zen Follower

Join Date:
Sep 2008
Location:
North Highlands, California 95660
Posts:
287
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

I would compare files and see what files cross over that are the same file folder & name. Then compare the files with winmerge or similar program and merge files together.

8 Mar 2012, 7:23 AM
#1496
divavocals avatar

divavocals

Totally Zenned

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

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Chargin:

Ok it looks like it was NOT the attributes mod. Ive totally uninstalled the admin profiles mod and now Im able to login again.
Very strange though because the admin profiles mod was working fine until I installed the attributes mod. Perhaps they arent compatable? I used the latest one I could find via the "Free software addons" link.

Thanks for replies.

creinold:

I would compare files and see what files cross over that are the same file folder & name. Then compare the files with winmerge or similar program and merge files together.
And to add to this it's possible that your issue was caused bu some setting in the admin profiles mod that needs to be tweaked.., so I would try posting your issue on their support forum as well..

8 Mar 2012, 12:54 PM
#1497
callmeal avatar

callmeal

New Zenner

Join Date:
Mar 2012
Posts:
42
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

callmeal:

Hi, I updated my cart (version v1.3.9e) with Version: 1.4.14 of Stock by Attributes. I am also using a free template from picaflor.

I'm a total newbie at this so sorry if this is a stupid question. I think I have installed the files correctly, as I'm getting the stock and products with attributes stock menus, and I've tried adding a few quantities for a few attributes (size ones) - but when i get to my website it still doesn't show? I choose a size in the dropdown, but the quantity available doesn't update... effectively in the actual website I can't see anything indicating the stock level by attribute. The website is jibadoo.com.au/products.

Help anybody? :(

[tumbleweeds roll by... ]

Please?

8 Mar 2012, 11:55 PM
#1498
creinold avatar

creinold

Zen Follower

Join Date:
Sep 2008
Location:
North Highlands, California 95660
Posts:
287
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Did you go through all the support pages and find all the fixes for SBA.... It's a daunting task but the old SBA has a lot of broken files that need to be fixed. My current version for Zen-Cart 1.5.0 is the most fixed version but doesn't work on older version of zen-cart.

8 Mar 2012, 11:58 PM
#1499
chargin avatar

chargin

Zen Follower

Join Date:
Sep 2011
Posts:
136
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Try actually adding an item to the cart and going to checkout, using an attribute for that item that you have set to no stock available.
The checkout should tell you theres no stock.

callmeal:

[tumbleweeds roll by... ]

Please?

9 Mar 2012, 12:11 AM
#1500
creinold avatar

creinold

Zen Follower

Join Date:
Sep 2008
Location:
North Highlands, California 95660
Posts:
287
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

My version allows it to show out of stock up in the dropdown menu but it made for zen-cart version 1.5.0. =(