- Posts: 8
- Thank you received: 0
Prices and Rating
-
toad78
Inactive member - Topic Author
- New Member
Less
More
12 years 2 months ago #22564
by toad78
Prices and Rating was created by toad78
I need to show the following items within the module:
Products SalesPrice Without Tax
Products SalesPrice
Rating
Is this possible to adapt the code to add these? Right now, it just shows the SalesPrice Without Tax.
Thank you.
Products SalesPrice Without Tax
Products SalesPrice
Rating
Is this possible to adapt the code to add these? Right now, it just shows the SalesPrice Without Tax.
Thank you.
Please Log in to join the conversation.
-
ivan.milic
Support Staff - Moderator
Less
More
- Posts: 14116
- Thank you received: 1639
12 years 2 months ago - 12 years 2 months ago #22570
by ivan.milic
Replied by ivan.milic on topic Prices and Rating
Open:
modules\mod_vmscroller\helper.php
find this line:
modules\mod_vmscroller\helper.php
find this line:
Code:
//$price = $pr->prices['salesPrice'];
and un comment it.
$price = $pr->prices['salesPrice'];
then put right index for price you want. If you don't know index name
add this line:
var_dump($pr->prices);
it will output entire object so you can pick right index you want to display when you save file and refresh page. Arter you see right name remove that line.
(note: index is string name 'salesPrice' in this post )
Last edit: 12 years 2 months ago by ivan.milic.
Please Log in to join the conversation.
-
toad78
Inactive member - Topic Author
- New Member
Less
More
- Posts: 8
- Thank you received: 0
12 years 2 months ago #22581
by toad78
Replied by toad78 on topic Prices and Rating
Thank you, ivan.milic.
I've done what you requested and do see the following string is what I need to implement:
["salesPrice"]=> string(7) "6.99000"
The downside is that I've uncommented the line but it is still not showing the 'Sales' price.
Here is the code:
I've done what you requested and do see the following string is what I need to implement:
["salesPrice"]=> string(7) "6.99000"
The downside is that I've uncommented the line but it is still not showing the 'Sales' price.
Here is the code:
Code:
$price_object = $db->loadObject();
$price = $pr->prices['salesPrice'];
var_dump($pr->prices);
$price = '<div class="productPrice">'.$price_object->pricetext.'</div>';
}
Please Log in to join the conversation.
-
ivan.milic
Support Staff - Moderator
Less
More
- Posts: 14116
- Thank you received: 1639
12 years 2 months ago - 12 years 2 months ago #22585
by ivan.milic
Replied by ivan.milic on topic Prices and Rating
Ok if that is want you want:
Code:
$price = '<div class="productPrice">'.$price_object->pricetext.'</div>';
change to:
$price = '<div class="productPrice">'.round($pr->prices['salesPrice'],2).'</div>';
Last edit: 12 years 2 months ago by ivan.milic.
Please Log in to join the conversation.
-
toad78
Inactive member - Topic Author
- New Member
Less
More
- Posts: 8
- Thank you received: 0
12 years 2 months ago #22588
by toad78
Replied by toad78 on topic Prices and Rating
Sorry, ivan.milic:
I actually want both prices to show. The Product price and the sales price.
I actually want both prices to show. The Product price and the sales price.
Please Log in to join the conversation.
-
ivan.milic
Support Staff - Moderator
Less
More
- Posts: 14116
- Thank you received: 1639
12 years 2 months ago #22590
by ivan.milic
Replied by ivan.milic on topic Prices and Rating
so one is $price_object->pricetext other is round($pr->prices,2). Compose price div as you want.
example:
$price = '<div class="productPrice">'.$price_object->pricetext.', '.round($pr->prices,2).'</div>';
example:
$price = '<div class="productPrice">'.$price_object->pricetext.', '.round($pr->prices,2).'</div>';
Please Log in to join the conversation.
Time to create page: 0.097 seconds