On my home page, I have made a image with a from label and added the image in a html block and added a shop now button but it would be good to have the price retrieved from the database for the specific category so if the price changes, it changes in the label so I don't have to keep changing the price text in the image.
Is there a extension that does this or anyone have sample code please, I am using oc 2.3.0.2. I have attached a screenshot of the images I made
The correct way is to make a module and display your information in the posistion you want.
Price label has to be displayed as html and a good practice is to use bootstrap badge class, something like:
The sql query to get the min price of a category is this: (you have to make it more complicateted if you want to check special and discount prices too)
If you cannot do it by yourself you have to pay someone else, I am glad to help you.
Price label has to be displayed as html and a good practice is to use bootstrap badge class, something like:
Code: Select all
<style>
.notification {
text-decoration: none;
padding: 15px 26px;
position: relative;
display: inline-block;
border-radius: 2px;
}
.notification .badge {
position: absolute;
top: 12px;
right: 10px;
padding: 2px 5px;
border-radius: 50%;
background: red;
color: white;
}
</style>
<div class="notification">
<span class="badge">$100.00</span>
</div>
Code: Select all
SELECT product_to_category.category_id,`product`.`product_id`, min(price) FROM `product`, product_to_category where `product`.`product_id` = product_to_category.product_id group by product_to_category.category_id
take a visit to My Modules !
Thank you but yeah I won't be able to do it myself I don't think as unsure how to make it into a module and how to get the min price of just a specific category
You'll have to pay a developer then.ianhaney50 wrote: ↑Wed Aug 05, 2020 5:11 pmThank you but yeah I won't be able to do it myself I don't think as unsure how to make it into a module and how to get the min price of just a specific category
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Who is online
Users browsing this forum: Baidu [Spider] and 29 guests