Post by zunox » Thu Apr 30, 2015 12:31 am

Is there exist module which can add to product which i want before price from.

Price from 10€ for example.

im using opencart 2.0.1.1

thanks

Newbie

Posts

Joined
Sun Mar 22, 2015 4:09 pm

Post by rph » Fri May 01, 2015 1:46 am

You can edit the template files if you want to try a solution yourself. For example, edit category.tpl and change code like:

Code: Select all

<?php echo $product['price']; ?>
to

Code: Select all

FROM <?php echo $product['price']; ?>
I also have a mod called Display Low Price which does this. It's only for 1.5.x right now but I'll be porting it over to 2.x in the next week or two.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by zunox » Fri May 01, 2015 3:32 pm

i dont want add this to all products, just on some which i want to

Newbie

Posts

Joined
Sun Mar 22, 2015 4:09 pm

Post by rph » Fri May 01, 2015 11:21 pm

This may be a job best suited for a developer. A very quick and dirty method would be:

Code: Select all

<?php if (in_array($product['product_id'], ['15', '25', '35'])) { ?>FROM<?php } ?> <?php echo $product['price']; ?>
where you replace the numbers (15, 25, 35) with the appropriate product_ids.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by zunox » Sat May 02, 2015 1:58 am

Is possible to add that to the whole category ?

Newbie

Posts

Joined
Sun Mar 22, 2015 4:09 pm

Post by rph » Sat May 02, 2015 2:06 am

Sure. Just modify the code so it's a category_id check.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by zunox » Sat May 02, 2015 2:50 am

i change code to:

Code: Select all

<?php if (in_array($product['category_id'], ['15', '25', '35'])) { ?>FROM<?php } ?> <?php echo $product['price']; ?>
and insert category id but it dont work

Newbie

Posts

Joined
Sun Mar 22, 2015 4:09 pm

Post by rph » Sat May 02, 2015 3:28 am

Yes, you need to rewrite the code. I already provided two fish. The third one is up to you to catch.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by zunox » Sun May 03, 2015 4:24 am

i get the error:

Notice: Undefined index: category_id in /home/majicena/public_html/trgovina/vqmod/vqcache/vq2-catalog_view_theme_default_template_product_category.tpl on line 141

that line is:

Code: Select all

<?php } ?>
      <?php if (!$categories && !$products) { ?>
      <p><?php echo $text_empty; ?></p>

Newbie

Posts

Joined
Sun Mar 22, 2015 4:09 pm
Who is online

Users browsing this forum: No registered users and 5 guests