News:

Support the VirtueMart project and become a member

Main Menu

Continue link

Started by roman5527, December 04, 2018, 17:31:19 PM

Previous topic - Next topic

roman5527

Hi, how i can change continue link to category page where is the ordered product? so that the user continues to view the products where they stopped?

thanks

jenkinhill

Edit and override components/com_virtuemart/views/cart/tmpl/padded.php
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

roman5527

Thank you for your response. I know the need to change this file. I soon wonder what to change to make the customer return to the category where he ended because it now returns to the first site of the category. well thank you

roman5527

Example : in category I have 10 pages. i click to product in page 7 . i add product to the cart and when i click to continue button i want go back to page 7 in category , no first page.
can you any idea how change padded.php file for this solution ? thanks

roman5527


Ventsi Genchev

Change:
echo '<a class="continue_link" href="' . $this->continue_link . '" >' . vmText::_('COM_VIRTUEMART_CONTINUE_SHOPPING') . '</a>';

With:
echo '<a class="continue_link" href="' . $this->close_facebox . '" >' . vmText::_('COM_VIRTUEMART_CONTINUE_SHOPPING') . '</a>';
Audio Store:
https://vsystem.bg - Bulgarian language
https://vsystem.bg/en - English

roman5527

Hi, Ventsi Genchev . Thank you for your answer . But this code stay on product page .

I want go back to page in category , but no on first , but n page where is this product.

do you have any idea for this solution ? many thanks

GJC Web Design

It is hard to do ..  if u are on a product page who knows what route u took to get there

fine .. we can know the cat but how would u know the pagination page?
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Ventsi Genchev

#8
Quote from: roman5527 on December 07, 2018, 11:58:09 AM
Hi, Ventsi Genchev . Thank you for your answer . But this code stay on product page .

I want go back to page in category , but no on first , but n page where is this product.

do you have any idea for this solution ? many thanks

The code I showed you closes the window and stays on the same page.
To go back to the category on the same page, you have a "Back to: category name" button. Or the "back" button in the browser.

Why do you think the user does not want to stay on the same page? What if he wants to see something else in the product?
No, he has to leave because there is no more work on this page?
Audio Store:
https://vsystem.bg - Bulgarian language
https://vsystem.bg/en - English

roman5527

Hi, my client want this solution.

back to category link is link to first page in category but I want page where is product .

example : product is in category page on 5 page . after click to continue link i want go back to 5 page in category.

do you have any idea for this solution ? tahnks

GJC Web Design

as explained... how?

pagination is a dynamic thing that can vary on every load! .. filtering, ordering etc..
and how do u know the user came from product x page 5??

It is a fairly nonsensical request from your client...  you should enlighten them
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

jenkinhill

If you want to see how VM will always go back to the first page of a category because a simple return is not possible,  just try selecting the product details of a product on (for example) page 3. From the product details page click on the return to category link - and see where you end up.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Jörgen

I do not get it, clicking back button in browser takes me back to the page I was before. This should be easy to do, I think. Have not tried, but this could work:
<button onclick="goBack()">Go Back</button>

<script>
function goBack() {
    window.history.back();
}
</script>


Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

GJC Web Design

No Jörgen,

what he means is that if he is on the prod detail page having come from anywhere or even from e.g. shoes - page 5 of a paginated category he wants the continue button to go back paginated page 5 shoes.
If he came from there then a JS return will work but in all other circumstances I assume u will land on PAGE 1 of shoes

The paginated pages are set in stone, they vary all the time depending on filters, orders, direction, products per page etc so is simply not possible without a complex query to find the product and what page it would appear on taking into account all the above variables
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

jenkinhill

Jörgen I just tried using that JS in padded.php on one of my development sites using Spyros' Hera template and it did return the shopper to the correct category page with the correct product on it. I can see that it probably wont work in all cases but maybe is the simplest "solution". 
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum