Re: Counting skipped products
yea, you are correct kent...so much for posting before coffee.
i fall back on my followup...get the client to use Merchant correctly.
Announcement
Collapse
No announcement yet.
Counting skipped products
Collapse
X
-
Re: Counting skipped products
Originally posted by Bruce - PhosphorMedia View PostHowever, I DO strongly suggest you get the client to start using the product (merchant) correctly.
Leave a comment:
-
Re: Counting skipped products
I don't think that you can fix this by fiddling with the offset. You'll still have pages with less than 36 products. The decision to display or skip a product occurs after each group of 36 is read from the DB.
Leave a comment:
-
Re: Counting skipped products
Just off the top of my head, what about changing the value of the offset when the product is skipped. For example,
<mvt:if expr="l.settings:product:price NE '0.00'">
<mvt:else>
<mvt:assign name="g.OffsetValue" value="g.OffsetValue - 1" />
</mvt:if>
However, I DO strongly suggest you get the client to start using the product (merchant) correctly.
(Note, Offsetvalue is a place holder, I don't recall off hand what the actual value is and I believe there are three others that might require conditioning.)Last edited by Bruce - PhosphorMedia; 03-26-14, 08:07 AM.
Leave a comment:
-
Re: Counting skipped products
I think you can use the store's built-in product-import module to turn category assignments on and off. If not, drop me a line and I'll write you one that can :^) .
Leave a comment:
-
Re: Counting skipped products
Okay, what the store owner wants and what I tried to do still isn't quite there. The store owner doesn't want the sold items to appear on the category pages, but still wants the product pages to be active. If I wrap the entire product thumbnail div with the inventory token it too can't count
Code:<mvt:if expr="l.settings:product:inv_level NE 'out'"> <div class="product-item" style="width:33%"> <div class="padding"> <div class="product-details"> <div class="product-thumbnail"> <mvt:if expr="NOT ISNULL l.settings:product:thumbnail"><a href="&mvte:product:link;"><img src="&mvte:product:thumbnail;" alt="&mvte:product:name;" /></a><mvt:else><a class="thumbnail-not-available" href="&mvte:product:link;" title="&mvte:product:name;"></a></mvt:if> </div> <div class="product-name"><a href="&mvte:product:link;">&mvt:product:name;</a></div> <mvt:if expr="l.settings:product:price NE '0.00'"> <div class="product-price">Price: <span class="bold">&mvt:product:formatted_price;</span></div> </mvt:if> <mvt:if expr="NOT ISNULL l.settings:product:customfield_values:customfields:Size"> <div class="custom-field" id="customfields-Size">&mvte:customfield_names:customfields:Size;: <span class="bold">&mvt:product:customfield_values:customfields:Size;</span></div> </mvt:if> <mvt:if expr="NOT ISNULL l.settings:product:customfield_values:customfields:sold"> <div class="custom-field" id="customfields-Size"><span class="bold" id="sold">&mvt:product:customfield_values:customfields:sold;</span></div> </mvt:if> <mvt:if expr="l.settings:product:inv_active">&mvt:product:inv_long;<br></mvt:if> </div> <div class="purchase-buttons"> <form method="post" action="&mvte:global:sessionurl;Screen=BASK"> <input type="hidden" name="Old_Screen" value="&mvte:global:Screen;" /> <input type="hidden" name="Old_Search" value="&mvte:global:Search;" /> <input type="hidden" name="Action" value="ADPR" /> <input type="hidden" name="Quantity" value="1" /> <input type="hidden" name="Attributes" value="Yes" /> <input type="hidden" name="Store_Code" value="&mvte:store:code;" /> <input type="hidden" name="Product_Code" value="&mvte:product:code;" /> <input type="hidden" name="Current_Product_Code" value="&mvte:global:Product_Code;" /> <input type="hidden" name="Category_Code" value="&mvte:global:Category_Code;" /> <input type="hidden" name="Offset" value="&mvte:global:CatListingOffset;" /> <input type="hidden" name="AllOffset" value="&mvte:global:AllOffset;" /> <input type="hidden" name="CatListingOffset" value="&mvte:global:CatListingOffset;" /> <input type="hidden" name="RelatedOffset" value="&mvte:global:RelatedOffset;" /> <input type="hidden" name="SearchOffset" value="&mvte:global:SearchOffset;" /> <mvt:item name="buttons" param="AddToBasketE" /> </form> </div> </div> </div> </mvt:if>
Leslie
Leave a comment:
-
Re: Counting skipped products
Thanks Kent, I'm going to advise the store owner to use the Inventory to continue displaying the products. On a side note, I wish the Availability / Price groups had the flexibility that the Inventory conditional does.
Leave a comment:
-
Re: Counting skipped products
I've run into this problem before. When you add a condition that removes some products from the display, the store keeps putting out 36 (or whatever number) products per page; it doesn't know that some of them are being skipped by the page template. Fixing this requires a custom module that can alter the product listings at a lower level, before they get to the page template. -- unless you can think of a clever work-around using the Active setting, or a price group, or some other built-in feature that the store already knows how to work with. Or instead of removing the product from the display, you can just remove the Add To Basket button, maybe replacing it with a "Sorry, sold out" message.
Leave a comment:
-
Re: Counting skipped products
Long story, short. Store owner used a custom field for all "sold" products and is using a price of 0.00. I'm trying to find a way to work with what is already being used to prevent having to go back in and change 100's of products. I'm thinking that probably using the Inventory set at Track Out of Stock Level but not hide them.
Leave a comment:
-
Re: Counting skipped products
I don't believe there's a way to add the next sequential product to the loop for each one skipped in that manner, and the only other solutions I'm thinking of would cause the page offsets to not work properly.
Is there a reason the products can't just be made inactive? Or their inventory reduced to 0 with "hide out of stock products" turned on? Or add them to an availability group?
Leave a comment:
-
Counting skipped products
So I thought I had a simple fix to not display products based on a condition
Code:<mvt:if expr="l.settings:product:price NE '0.00'"> </mvt:if>
So how do I make it count?
LeslieTags: None
Leave a comment: