Jump to content

Can we add multiple prices?


Recommended Posts

Hi,

I was thinking exactly the same thing: turn prestashop into a comparison website for some products that I sell (or for those I don't sell but that are within my market).

I thought to create attributes caracteristics called: website, price and link where to store each competitor info, but then I have seen that you can add this info only once, so I now am thinking if it makes sense to add attributes caracteristics like:

website1

price1

link1

and then

website2

price2

link2

and so on...

it looks like it's not going to be easy.

But maybe someone can point us in a better direction.

Link to comment
Share on other sites

You can look into the customer groups option, you may have to modify the code a bit to make sure all registered users are put in a new customer group, and all the non registered users will be in a different group (each group will have its own prices).

Link to comment
Share on other sites

Thank you for the replies, but this is not exactly what I want.

 

What I want is for example, say a product A which is sold by 3 providers with 3 different prices. I would like to list product A with the three different prices from each provider. Can that be done with Prestashop? Here is an example of a site that does that

 

http://ribera-del-duero.uvinum.es/pago-de-los-capellanes-crianza-2008

Link to comment
Share on other sites

Ok, I understand now your request.

 

The price Editor module doesn't address this feature.

 

I'm not aware of such module for prestashop.

 

If you are able to display both prices, how will the customer choose the price he wants ?

Link to comment
Share on other sites

fernandoch

eventually what I did is this:

I created a new table in the db with few fields such as:

id, product_id, website_name, price, link, date

Where product_id is the id of the product I have in my store (the wine of your example, for instance), website_name is the name of the vendor, the price is the price at which they sell this product and the link is the link at their website and the date is for me, because I want to be able to order for the most recent one.

 

 

I then created a small php script called "competitors.php":

<?php
$result = mysql_query("SELECT * FROM ks_multi_suppliers WHERE id_product=$product->id");
if (!$result) {
   die('Invalid query: ' . mysql_error());
}
while ($row = mysql_fetch_assoc($result)) {

?>
<div id="buy_options">
<h2>Compra
<?php
echo "$product->name";
?>
</h2>
<ul class="vendors">
<li class="vendor_details"><?php echo $row['website_name']; ?></li>
<li class="vendor_details"><?php echo $row['product_price'];?> €
</li>
<li class="vendor_details"><a href="<?php echo $row['supplier_product_link'];?>
">Comprar</a></li>
<li class="vendor_details"> <?php echo $row['date_taken'];?></li>
</ul>
</div>   



<?php }
?>

and then I called it in the "product.php" file like this:

include(dirname(__FILE__).'/competitors.php');

right at the end of the file, before the call to the footer.php

 

If you don't want to link to outside pages, but you instead want to grab the user's choice and put it into your cart, it should not be too hard I guess, just put a form and a button into the competitors file and link it to the shopping cart.

hope it helps.

Link to comment
Share on other sites

  • 2 years later...
×
×
  • Create New...