Jump to content

[Resolved] Product Condition Changes


meritmart

Recommended Posts

Hey all, happy new year and possibly the first question of it !!

In definitions.xml and product.index, I've been trying to add further items to the "conditions" such as "Used: Like New", "Used: Very Good" and "Used: Good" and although they show up OK in the admin panel and I can select and save those conditions, they never seem to show on the product page.   I've since reverted the changes and kept everything the way it was, apart from edit the language section in the ACP which now reads: "condition_new" as New, "condition_used" as Used: Like New and "condition_refurbished" as Used: Very Good and again, all showing up in the admin panel no problems but again, if I select the condition, for example, "Used: Very Good" the product page is showing "Refurbished".   I've cleared the cache several times via the ACP as well as my browsers, etc, but nothing seems to show as it should on the product page.   Probably something very simple that I'm missing but I'm humped if I can figure it out.

Any help greatly appreciated :)
Thanks in advance

Marko

Can't believe me sometimes, as soon as I post the question it suddenly dawns on me - I had to edit both the "Catalogue" language and "Common" language to get this to work.   So, I guess my next question then is, if I were to manually change the "definitions.xml" and "product.index" templates to add more "conditions", how do they then not show up on the product pages?.

Thanks again

Marko

.... and just another to be a complete annoyance - I'm calling the condition on the homepage too, using "{$PRODUCT.condition}", but it's still not showing ??

Link to comment
Share on other sites

The Homepage has the code {foreach $LATEST_PRODUCTS as $product}, so the variable you want to use is {$product.condition}. We may need to add that property to the array of each product's properties  - the amount of data wasn't meant to be comprehensive for the Homepage.

However, other boxes and other pages use other variables, so wherever you are wanting to add more data about a product, be sure to find the associated variable for the item's Name and match the capitalization and spelling.

The "common" phrases for keys 'condition', 'new', 'used', and 'refurbished' were introduced in CC6, whereas the keys in "catalogue" are from CC5 - and perfectly usable in CC6. I don't know why the "common" keys were added.

The database saves the key word.

Link to comment
Share on other sites

  • 1 year later...

In the admin skin template products.index.php, find:

Near lines 161-165:

            <select name="condition" id="condition" class="textbox" type="text">
            <option value="new" {if $PRODUCT.condition == 'new'}selected="selected"{/if}>{$LANG.catalogue.condition_new}</option>
            <option value="used" {if $PRODUCT.condition == 'used'}selected="selected"{/if}>{$LANG.catalogue.condition_used}</option>
            <option value="refurbished" {if $PRODUCT.condition == 'refurbished'}selected="selected"{/if}>{$LANG.catalogue.condition_refurbished}</option>
            </select>

You can add more options here.

(Note for future reference: this code isn't the best method - the next version of CubeCart may have the "correct" way: these options should be collected in the source file and iterated in the template code.)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...