Live again! http://spritelygoods.com Rebuilt on ZC v 1.5.1 from 1.3.0.2
Thanks for the prompt Red. The url is at the following
my store
The following url is of a product that has the stock by attribute activated on it.
Beautiful Bridal Babydoll
Colour: White
Size: Small
3 Quantity
Colour: White
Size: Medium
6 Quantity
Colour: White
Size: Large
3 Quantity
My settings in admin>stock are still
I would like to change the "check stock level" back to true, but if I do this then every item that has the stock by attribute activated shows up as "out of stock" and cannot be ordered.Check stock level false (this used to set to true before mod install)
Subtract stock true
Allow Checkout false
Mark product out of stock ***
I could leave it as it is, but this won't work for me as there are products in store that I do not intend on restocking which is why I have the "check stock level" active normally
other mods that I am using are:
IH2
Links Manager 1
Aus Direct Deposit
Shipping Insurance
Recover Cart Sales
Cross Sell Products
referrals
News Box Manager
User Tracking
Off Site Payment
Western Union Money (disabled)
DRM Delivery (local delivery)
Paypal Verified
Login Box
Ask A Question
Aus Shipping (disabled)
Better Categories
Returns
Scrolling Specials
Improved Attributes Controller
Ez Pages on Site Map (which i think maybe incorporated into the 1.3.7 edition)
shopping cart with images (sidebox)
testimonials (disabled)
css flyout menu
There may be more, I can't quite remember but as you can see she is pretty much loaded with mods. I am wondering if one of the above mods is conflicking with this mod
Any assistance from anyone would be really appreciated.
I've asked this in another tread. I was referred to the middle of this tread, but the answer is only partially complete and I'm not great with PHP.
What i need to do is add Sold out beside the attribute if its stock level is 0.
So thats for radiobuttons, check boxes or dropdowns.
I know somebody in here has been able to do it
If so can you please PM me your attributes file, because I cant get my head around it.
woodlandsprite
Thanks for the info. Found a fix at wiki but the fills they say to modify do not match the new files in zen-cart so could not get it to work at all. Some one must have gotten the stock amount to show in the product pages for this new version. Hope someone can steer me in the righ direction.
[QUOTE=frank_lyy;293871]First, a little bug that I found in your new release by using beyond compare with older ones.
In functions_lookups.php on line 163:
should've been:
Next, I applied a fix by Grayson posted in archived threads to show qty of attributes on product info page. For those who still having trouble with this fix, I am including the attributes.php file here. You may drop it in includes/modules/your_template/ folder.
I am also including another alternative version of this fix (I take no credit whatsoever on this), which shows attribute stock after price_fix and weight etc. display, which makes more sense to myself, becasue this way customer won't confuse stock level with quantity discounts/surcharges. This alternative file is called attributes_Alternative.php. You need to rename it to attributes.php to overwrite the existing one when using.
Don't forget to add a define to the product_info.php in includes/languages/english/your_template folder, such as:
I found the fix I was looking for post # 46 Thanks Frank for the great post the patch file did just what i wanted it to and that was to add product stock to the product pages.[define('TEXT_ATTRIBUTES_PIECES','pieces');/QUOTE]. I use 'in stock' instead of 'pieces', for it makes more sense.
Now, I need help for myself!! I tried hard to set a "display only" option value such as " select from below" to NOT show stock level, which is a conditional undone of the above fix in attributes.php. I tried codes as follows, but no luck:
This block of codes were applied after the "// prepare product options details" section and before "//radio buttons" section.
Any help on this would be greatly appreciated!
I KNOW MOM I'LL GO BLIND IF I DON'T QUIT THAT!
PHP can turn one's mind to mush. Back to the pound I go.
Silent Thunder Products, Prices So Low Is't Almost Criminal!
This should be in the same spot as well underneth I believe ?:) ~Renee
[FONT="Comic Sans MS"]Red[/FONT]
Hello,
I've a solution for adding Sold Out on the attribute if the stock of it is 0.
It works for dropdown boxes, radio buttons and checkboxes.
I've modified kuroi's attributes.php file, adding the suggestions of other people and figuring it out for dropdowns.
- First you need to add this to:
includes\languages\english\custom\product_info.php
if product_info.php is not there it will be in
includes\languages\english\product_info.php
Once you have added the below move the file to your custom directory
PHP Code:
define('TEXT_ATTRIBUTES_NOT_IN_STOCK',' Sold Out');
- I've changed the function "function zen_draw_pull_down_menu" in includes\functions\html_output.php
PHP Code:
function zen_draw_pull_down_menu($name, $values, $default = '', $parameters = '', $required = false) {
$field = '<select name="' . zen_output_string($name) . '"';
$soldout = "";
if (zen_not_null($parameters)) $field .= ' ' . $parameters;
$field .= '>' . "\n";
if (empty($default) && isset($GLOBALS[$name])) $default = stripslashes($GLOBALS[$name]);
for ($i=0, $n=sizeof($values); $i<$n; $i++) {
/* Added by TB on 16/2/2007 */
/*need to check if Sold Out occurs in the option tag for the dropdown*/
if(strpos($values[$i]['text'], "Sold Out")) $soldout = 'class ="red bold"';
else $soldout = "";
$field .= ' <option '.$soldout.' value="' . zen_output_string($values[$i]['id']) . '"';
if ($default == $values[$i]['id']) {
$field .= ' selected="selected"';
}
$field .= '>' . zen_output_string($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '</option>' . "\n";
}
$field .= '</select>' . "\n";
if ($required == true) $field .= TEXT_FIELD_REQUIRED;
return $field;
}
- Then I modified kuroi's attributes.php file. Located in
includes\modules\custom\attributes.php.
See attached. Rename your old one to something like attributes.php-old and upload this one.
- Then I added the class .red to my stylesheet, which just sets color:red
If anybody cares to try this in a test environment for me after they have installed the stock by attributes module.
Please let me know how it goes. It should work, works for me, but no guarantees.
Then I added the class .red to my stylesheet, which just sets color:red
Wow, I've been wanting this feature for a long time. I followed all of these steps and the "Sold Out" displays correctly. The only thing is that my text isn't red or bold.
hi,
have you added the style to your custom stylesheet and for the radio buttons and check boxes i wrapped TEXT_ATTRIBUTES_NOT_IN_STOCK in attributes.php in span tags with the class red and bold
I actually spoke too soon. I checked some other pages and noticed that adding this mod knocks out my color dropdown choices. It just returns a blank dropdown so I had to revert back.
Bookmarks