X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Product Variants and Product Name, Product List Price (https://forum.x-cart.com/showthread.php?t=52569)

worldomega 02-28-2010 06:01 AM

Product Variants and Product Name, Product List Price
 
Is it at all possible for each product variant field to automatically add to the product name and also have its own list price.

For example,

vitamin, 60 softgels
vitamin, 120 softgels

"vitamin" is product with "60 softgels" and "120 softgels" as variants.

It would be nice to show the product name as "Vitamin, 60 softgels" or "Vitamin, 120 sofgels" depending on which variant is displayed. Ideally, this "extra field" info about variant should propagate to the page title also. The advantage of this is it is more customer friendly instead of creating multiple pages.

Also, they should have their own list prices, so that the sale price reflects off the correct "market price" for each variant.

Is this possible in 4.3?

If it is not possible through variants, what is the best way to accomplish this?

TBone 03-08-2010 11:12 PM

Re: Product Variants and Product Name, Product List Price
 
Productvariants do not have their own listprice. Only sale price.
Choosing a variant only flips the price and sku and stocklevel (if displayed).
Qualiteam can easily modify this for you if you wish to have the functionality you described.

worldomega 03-09-2010 06:10 AM

Re: Product Variants and Product Name, Product List Price
 
Thanks! I was hoping for some hints to implement it myself and share with the forum. Not sure how much Qualiteam would charge? I am sure this feature is not unique to me!

equinix 06-09-2010 03:16 AM

Re: Product Variants and Product Name, Product List Price
 
Hi worldomega

Did you make any progress with this feature on your project?

It seems like a missed opportunity for a mod to do this, and I agree - we cannot be the only 2 people who use Xcart and need this function.

I contacted Xcart to quote me for modifying variants to include list price, they quoted initially $200

I need to check that includes the ability to import Inventory of list price and market price for variants too.

Spiceworld 01-19-2011 01:01 AM

Re: Product Variants and Product Name, Product List Price
 
Hi

I have also just today realized that i need this MOD. So if it's still open count me in.

Cheers

shirtshop 01-19-2011 07:04 AM

Re: Product Variants and Product Name, Product List Price
 
check this and vote on it
http://ideas.x-cart.com/forums/32109-x-cart-future-versions/suggestions/1375189-product-variants?ref=title

hhiker 03-25-2011 02:03 PM

Re: Product Variants and Product Name, Product List Price
 
Raising hand for list price and sale price on variants for v 4.3.2

And we are NOT upgrading to the new version.

cflsystems 03-25-2011 02:04 PM

Re: Product Variants and Product Name, Product List Price
 
I don't think QT will add any new features to any XC version other than 4.4.3 unless you pay to have this custom coded

Spiceworld 03-25-2011 11:42 PM

Re: Product Variants and Product Name, Product List Price
 
This really is a basic feature and should already be in there.

Such basic stuff is being overlooked and then charged for.

shirtshop 03-26-2011 03:29 AM

Re: Product Variants and Product Name, Product List Price
 
for us a reason to look out for a other shoppingcart and we found one and which have all that what we need as standard and under x-cart we must pay 1000 of $ for customizing, so sad because we using xcart for about 10 years now

XCart4Life 11-04-2011 05:15 PM

Re: Product Variants and Product Name, Product List Price
 
Success!!!! :D/I was using an older post on here to add list price to product variants. I'm testing out 4.4.4 but the post was for 4.1 or 4.2 and the file structure has completely changed since. After spending hours and searching through code I finally got it working (the main part at least).

So from the admin side when you log into product variants you have list price as an extra field. When you fill in the field and click apply changes it updates the database with the list price. I also got the list price to change dynamically with the func.js script on the product details page.

Some other things that I still have to work on:
1.) Importing and exporting functionality.
2.) The save% calculation needs to be worked on.
3.) Showing the msrp for the default product variant on the product listings

I promise I will post the files I edited and the changes. I figure I needed to give back because I've used this forum hundreds of times.

XCart4Life 11-04-2011 11:30 PM

Re: Product Variants and Product Name, Product List Price
 
This is a Product Variant - List Price Mod for X-Cart 4.4.4.

I moved some of the product options .tpl files to my skin folder with the same folder structure so I could modify them without changing the original files.
The line numbers are not accurate use them as a reference...just search and find the line of code you are looking for.

Modded Files:
/skin/your_skin/modules/Product_Options/check_options.tpl
/skin/your_skin/modules/Product_Options/product_variants.tpl
/skin/your_skin/customer/main/product_details.tpl
/modules/Product_Options/product_variants.php
/skin/common_files/modules/Product_Options/func.js
/skin/common_files/main/product_details.tpl

Ok let's get started!

First add list_price field to your 'xcart_variants' table in your database. Make sure it is the last entry in the table. I used phpMyAdmin from my site's cpanel:
list_price DECIMAL 12,2

/skin/your_skin/modules/Product_Options/check_options.tpl
This pulls list_price from the database and puts it into an array.

find (around line 40):
PHP Code:

'{$v.productcode|wm_remove|escape:javascript}',
{
$v.W_is_png|default:0}, 


add this below:
PHP Code:

{$v.list_price|default:$v.list_price|default:'0'}, 


/skin/your_skin/modules/Product_Options/product_variants.tpl
This code adds the list_price field to the admin product variants area.

find (around line 115):
PHP Code:

<td class="DataTable">{$lng.lbl_in_stock}</td>
<
td class="DataTable">{$lng.lbl_price}</td


add this below (don't forget to add $lng.lbl_variant_list_price to your langauge labels... My label says 'List Price'):
PHP Code:

<td class="DataTable">{$lng.lbl_variant_list_price}</td


find (around line 133):
PHP Code:

<td class="DataTable"><input type="text" size="5" name="vs[{$k}][avail]" value="{$v.avail|formatnumeric}/></td>
<
td nowrap="nowrap" class="DataTable"><input type="text" size="7" name="vs[{$k}][price]" value="{$v.price|formatprice}/> 


add this below:
PHP Code:

<td nowrap="nowrap" class="DataTable"><input type="text" size="7" name="vs[{$k}][list_price]" value="{$v.list_price|formatprice}/> 


/skin/your_skin/customer/main/product_details.tpl
This sets the id for list_price so later it can be changed with the func.js.

find(around line 96):
PHP Code:

{if $product.appearance.has_market_price and $product.appearance.market_price_discount gt 0
<
tr


modify existing line to match:
PHP Code:

{if $product.appearance.has_market_price and $product.appearance.market_price_discount gt 0
<
tr>
<
td class="property-name product-taxed-price" colspan="3">{$lng.lbl_market_price}: <span id="list_price">{currency value=$product.list_price}</span></td


/modules/Product_Options/product_variants.php
Without this code your list_price wouldn't update in the database when you press 'apply changes'.

find (around line 122):
PHP Code:

$v['weight'] = func_convert_number($v['weight']);
$v['avail'] = func_convert_numeric($v['avail']); 


add this below:
PHP Code:

$v['list_price'] = func_convert_numeric($v['list_price']); 


find (around line 128 ):
PHP Code:

'weight'     => $v['weight'],
'avail'     => $v['avail'], 


add this below:
PHP Code:

'list_price'     => $v['list_price'], 


/skin/common_files/modules/Product_Options/func.js
This code updates the list price when a customer selects a variant. And the other code fixes the save % so it changes correctly when the customer changes to a different product variant.

find (around line 147):
Code:

/* Change product code */
if (document.getElementById('product_code'))
document.getElementById('product_code').innerHTML = variants[variantid][0][5];


add this below:
Code:

/* Change list price */
if(document.getElementById('list_price'))
document.getElementById('list_price').innerHTML = price_format(variants[variantid][0][7]);


find (around line 58 ):
Code:

orig_price = variants[variantid][0][4];
change to this:
Code:

/*orig_price = variants[variantid][0][4];*/
list_price = variants[variantid][0][7];


/skin/common_files/main/product_details.tpl
This code is optional. It disables editing list price from the product management area in admin and makes a link to product variants.

find (around line 205):
PHP Code:

<td class="FormButton" nowrap="nowrap">{$lng.lbl_list_price} <span class="Text">({$config.General.currency_symbol}):</span></td>
  <
td class="ProductDetails"><input type="text" name="list_price" size="18" value="{$product.list_price|formatprice|default:$zero}/></td


change to match this:
PHP Code:

<td class="FormButton" nowrap="nowrap">{$lng.lbl_list_price} <span class="Text">({$config.General.currency_symbol}):</span></td>
  <
td class="ProductDetails">
  {if 
$product.is_variants eq 'Y'}
  <
b>{$lng.lbl_note}:</b> {$lng.txt_pvariant_edit_note|substitute:"href":$variant_href}
  {else}
  <
input type="text" name="list_price" size="18" value="{$product.list_price|formatprice|default:$zero}/>
  {/if} 


I compiled this after I modded my site. I have not tested this walk through. This is a complicated mod so forgive me if I missed something.

cflsystems 11-29-2011 01:46 PM

Re: Product Variants and Product Name, Product List Price
 
To add to the above - one more file needs to be edited in order to preserve list prices if variants are turned on/off or deleted

Open /modules/Product_Options/func.php and find

Code:

        $data = array(
            'productid'        => $productid,
            'avail'            => $_product['avail'],
            'weight'        => $_product['weight'],
            'productcode'    => $sku,
        );


and replace with

Code:

  $list_price = $vars[$old_variantid]['list_price']; // added by CFL Systems to preserve list_price for variants
 
        $data = array(
            'productid'        => $productid,
            'avail'            => $_product['avail'],
            'weight'        => $_product['weight'],
            'productcode'    => $sku,
  'list_price'  => $list_price, // added by CFL Systems to preserve list_price for variants
        );


If using BCS mod for variants with orderby sorting that needs to be added there instead - bug in the mod

Code:

  $orderby = $vars[$old_variantid]['orderby']; // added by CFL Systems to preserve orderby for variants - BCSE mod bug
  $list_price = $vars[$old_variantid]['list_price']; // added by CFL Systems to preserve list_price for variants
 
        $data = array(
            'productid'        => $productid,
            'avail'            => $_product['avail'],
            'weight'        => $_product['weight'],
            'productcode'    => $sku,
  'orderby'  => $orderby, // added by CFL Systems to preserve orderby for variants - BCSE mod bug
  'list_price'  => $list_price, // added by CFL Systems to preserve list_price for variants
        );


andyk96 05-02-2012 11:10 PM

Re: Product Variants and Product Name, Product List Price
 
Does anyone have away to do this in Version 4.4.5?

Spiceworld 05-02-2012 11:51 PM

Re: Product Variants and Product Name, Product List Price
 
This should be standard code in todays market.

Stupid having to keep on adding after each upgrade!

If only they listened to their customers :(

andyk96 05-02-2012 11:58 PM

Re: Product Variants and Product Name, Product List Price
 
Ok Got everything where it needs to be, but the price is not changing when you click on the variable. Where did i go wrong.

andyk96 05-03-2012 12:07 AM

Re: Product Variants and Product Name, Product List Price
 
Also, the part where it says "don't forget to add $lng.lbl_variant_list_price to your langauge labels... My label says 'List Price'"

Where is that done at? Maybe that is my problem?

Thanks for all the help.

andyk96 05-03-2012 12:21 AM

Re: Product Variants and Product Name, Product List Price
 
Ok Got everything where it needs to be, but the price is not changing when you click on the variable. Where did i go wrong.
Also, the part where it says "don't forget to add $lng.lbl_variant_list_price to your langauge labels... My label says 'List Price'"

Where is that done at? Maybe that is my problem?

Thanks for all the help.


Quote:

Originally Posted by Spiceworld
This should be standard code in todays market.

Stupid having to keep on adding after each upgrade!

If only they listened to their customers :(


andyk96 05-03-2012 11:34 PM

Re: Product Variants and Product Name, Product List Price
 
Can anyone give me a hand? I'm stuck and dont know where to turn. Got this far and again it wont change once the variable is clicked. NOt sure what is missing.

Any help would be great

Warwick 06-08-2012 03:35 AM

Re: Product Variants and Product Name, Product List Price
 
Anybody tried this with 4.2?

A real nasty one to tackle, I now have variants that show a higher sell price when they are selected than the 'normal' list price. This does look very 'unselleable, never noticed of thought about this before though :-(

Example:
Product has three variants; Small, Medium and Large

Small costs 10 dollar
Medium costs 12 dollars
Large costs 14 dollars

Normally the basic variant (small) costs 13 dollars

So now only with the small version the 'normally 13 dollars, our price 10 dollars' is shown
But when the large variant is selected, for example medium, it says 'Normally 13 dollars, our price 14 dollars' .... selling price appearing to be higher than the from price.

In cases off rather cheap products with little difference between variantprices one would say that a solution would be to just set the from price at a higher amount than the most expensive variant.
But this will look suspicious with higher priced products, cretaing huge gaps between the from and for price with the cheapest variant.

cherkes 06-08-2012 10:25 AM

Re: Product Variants and Product Name, Product List Price
 
I am just implementing 4.4.5 from 4.1.8 and noticed this problem when testing my database migration. I really don't want to tackle a fairly major mod to get this to work, so I guess I will eliminate market price from anything that has variants. This is definitely something that should have been included in the cart system by now. I guess it must generate a lot of revenue for xcart. "Develop once and charge (full price) many times for the same mod."

Warwick 06-08-2012 10:37 AM

Re: Product Variants and Product Name, Product List Price
 
I totally agree.

Also a conversion stopper, showing from prices is marketing at its best.

Talk about a bummer :-(
Can't believe I never noticed this before, have been running X-Cart since early 2005 ... me feel stupid.

I meanwhile removed the from text and at least the savings icon is there.

Big mod opportunity though, any mod developers around?
I would buy immediately(!) and since this is affecting all versions of X-Cart ... lot of potential I'd say!

Best would be: a mod that would automatically up the -normal- (from) price by calculating the difference in percentage between the normal price and cheapest variant, then executing this percentage automatically with other variants. Not 100% truth in some cases with all variants but a way to fix this without having to modify all variants in shops with a normal price.
Is better than having a lower normal price than the selling price and even more better than having no normal price ...

Maybe this is possible with some nifty if/then statement?

cherkes 06-08-2012 10:47 AM

Re: Product Variants and Product Name, Product List Price
 
Quote:

Originally Posted by Warwick
I totally agree.

Also a conversion stopper, showing from prices is marketing at its best.

Talk about a bummer :-(
Can't believe I never noticed this before, have been running X-Cart since early 2005 ... me feel stupid.

I meanwhile removed the from text and at least the savings icon is there.

Big mod opportunity though, any mod developers around?
I would buy immediately(!) and since this is affecting all versions of X-Cart ... lot of potential I'd say!


You and me both. I like your idea of removing the text, so at least it would still say it was x% below market price. Clever.

cherkes 06-08-2012 10:50 AM

Re: Product Variants and Product Name, Product List Price
 
Actually though, I just noticed that the "savings graphic" disappears unless the core product is selected. Bummer indeed.

Warwick 06-08-2012 10:58 AM

Re: Product Variants and Product Name, Product List Price
 
You sure? I don't have that, but could be that I already changed this earlier on, can't recall. At least this is doable with an if/then statement somehow.

Today I became aware of this variants normal pricing problem while one of my clients reported being called by clients (a lot!) asking why they had to pay more than the normal price ... ... call them dumb but this is and should be a true eye opener for all X-Cart shop owners!

A lesson in never to figure what you think is logical and will be understood the same way by others. Who knows how many sales this has cost you/us/any X-Cart webstore owner ... :(

Warwick 06-08-2012 11:08 AM

Re: Product Variants and Product Name, Product List Price
 
Carl, checked my code for you (but be aware: it is 4.2.x):

It is in your product.tpl and I think this is taking care of it:

Code:

{if $product.taxed_price gt 0 && $product.list_price gt 0}
                  <div class="save" id="save_percent_box"{if  $product.appearance.market_price_discount eq ""} style="display:  none;"{/if}>
                    <span id="save_percent">{$product.appearance.market_price_discount}</span>%<br />Discount
                  </div>
                {/if}


But wait, I see this twice in my code, so maybe I just added it again somewhere in the description section and thus it'll show ... I'm not a hardcoder unfortunately and fix some things through trial and error - without recollection. :)

I am quite sure I changed this in the past because something wasn't working correctly with the icon, have no memory what the issue was though ...

But with me the icon remains shown with selection of other variants - great because it shows the same percentage as discount with all of them. :D/

Warwick 06-08-2012 11:13 AM

Re: Product Variants and Product Name, Product List Price
 
But it could also be that the icon not showing with you is version related, I have no idea ...

cherkes 06-13-2012 12:02 PM

Re: Product Variants and Product Name, Product List Price
 
Just getting back to this. I will take a look. And since I just upgraded to 4.4.5, I need to update my signature also!

cherkes 06-13-2012 12:38 PM

Re: Product Variants and Product Name, Product List Price
 
I decided to go through and clear list prices from all products that had variants (that had a negative impact). I am considering making my own set of discount icons and adding them to product descriptions. The only bad part about that is the time to add them manually.


All times are GMT -8. The time now is 03:29 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.